c# - 如何使功能区控件快速访问工具栏位于 GUI 的顶部?

标签 c# wpf visual-studio-2012 ribbon-control

如何使功能区控件快速访问工具栏位于 GUI 顶部?

enter image description here

所以我需要快速访问工具栏出现在顶部,就像在 Windows 应用程序中一样,例如 言语和展望。

编辑:这是我在其他人反馈后的最新代码:

<r:RibbonWindow
    x:Class="Company.RouteVisualization.MainWindowView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:r="clr-namespace:System.Windows.Controls.Ribbon;assembly=System.Windows.Controls.Ribbon"
    Title="Route Visualization"
    Height="395"
    Width="832"
    TextOptions.TextFormattingMode="Display"
    WindowStyle="None">
    <Grid>
        <r:Ribbon Grid.Row="0" Name="ribbon">
            <r:Ribbon.QuickAccessToolBar>
                <r:RibbonQuickAccessToolBar>
                    <StackPanel Orientation="Horizontal">
                        <r:RibbonButton Label="B1" VerticalAlignment="Center"/>
                        <r:RibbonButton Label="B2" VerticalAlignment="Center"/>
                    </StackPanel>
                </r:RibbonQuickAccessToolBar>
            </r:Ribbon.QuickAccessToolBar>
            <r:RibbonTab Header="Home">
                <r:RibbonGroup Name="groupHome" Header="View">
                    <r:RibbonToggleButton Name="DisplayMapButton" Label="Display Map" IsChecked="True"
                    LargeImageSource="../Resources/Images/Earth.png" 
                    RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                    <r:RibbonToggleButton Name="OnlineButton" Label="Online"    
                    LargeImageSource="../Resources/Images/Online.png"     
                    RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                </r:RibbonGroup>
            </r:RibbonTab>
        </r:Ribbon>
    </Grid>
</r:RibbonWindow>

最佳答案

关于c# - 如何使功能区控件快速访问工具栏位于 GUI 的顶部?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18867860/

相关文章:

c# - 如何在wpf datagrid中组合多个标题

wpf - Visual Studio 2012 深色主题 WPF 资源字典 xaml 文件

C++ Visual Studio 2012 -> 2010

c# - 当Bloomberg API通过C#连接到BBCOM时调用问题

c# - 我正在寻找指向 cdb/windbg + .net 文档的链接

c# - 模拟新的 Microsoft Entity Framework Identity UserManager 和 RoleManager

c# - 工具栏中的按钮自动对齐

c# - 在 C# 中验证数字签名

c# - 为什么我不能在这种情况下设置不透明度?

sdk - Visual Studio 2012 命令行构建