如何使功能区控件快速访问工具栏位于我的 GUI 顶部?
所以我需要快速访问工具栏出现在顶部,就像它在 Word 和 Outlook 等 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>