开发者

how to show status bar in ribbon window wpf c#

开发者 https://www.devze.com 2022-12-10 02:47 出处:网络
I would like to use the ribbon bar like MS Office 2007 (and greater) in my own applications. Could anyone please provide me with links or references about how I can do this?

I would like to use the ribbon bar like MS Office 2007 (and greater) in my own applications. Could anyone please provide me with links or references about how I can do this?

EDIT: Actually I am using Microsoft's Ribbon Control Library but could not found way to add st开发者_如何学Goatus bar like MS Word.


Maybe give this library a shot?

EDIT: Actually, apparently Microsoft have released their own.


I have found the way to display StatusBar in a good way,

I hope it helps some else.. ..

<DockPanel LastChildFill="True">
    <ribbon:Ribbon DockPanel.Dock="Top">
          <ribbon:RibbonTab Label="Banking">
             <ribbon:RibbonGroup>
                  <ribbon:RibbonButton Command="me:AppCommands.Cut"/>
                  <ribbon:RibbonButton Command="me:AppCommands.Copy"/>
                  <ribbon:RibbonButton Command="me:AppCommands.Paste"/>
             </ribbon:RibbonGroup>

             <ribbon:RibbonGroup>
                  <ribbon:RibbonButton Command="me:AppCommands.AddNew"/>
                  <ribbon:RibbonButton Command="me:AppCommands.Clear" />
                  <ribbon:RibbonButton Command="me:AppCommands.Delete"/>
             </ribbon:RibbonGroup>

            <ribbon:RibbonGroup>
                  <ribbon:RibbonButton Command="me:AppCommands.DownloadStatements"/>
                  <ribbon:RibbonButton Command="me:AppCommands.DownloadCreditCards"/>
                  <ribbon:RibbonButton Command="me:AppCommands.Transfer"/>
            </ribbon:RibbonGroup>
         </ribbon:RibbonTab>
    </ribbon:Ribbon>

    <StatusBar x:Name="StatusBar"
                   VerticalAlignment="Bottom"
                   DockPanel.Dock="Bottom">
            <StatusBar.ItemsPanel>
                <ItemsPanelTemplate>
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="4*" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                    </Grid>
                </ItemsPanelTemplate>
            </StatusBar.ItemsPanel>
            <StatusBarItem Margin="0,-3,0,-2" BorderThickness="1">
                <TextBlock x:Name="statusBarText">www.247moneymakingschemes.blogspot.com</TextBlock>
            </StatusBarItem>
            <StatusBarItem Grid.Column="1">
                <ProgressBar Width="80"
                             Height="18"
                             Value="30" />
            </StatusBarItem>
            <StatusBarItem Grid.Column="3">
                <TextBlock>Go!</TextBlock>
            </StatusBarItem>
        </StatusBar>

       <TextBlock DockPanel.Dock="Top" Content="Put your main content/items control here as last child in dock panel" />
</DockPanel>

Cheers..


Microsoft has made their ribbon control officially available for WPF. Its free, and its the real deal, strait from the horses mouth. You can read about it here, and download it here.

0

精彩评论

暂无评论...
验证码 换一张
取 消