0

当我使用 WPF 和功能区控件创建组时,我遇到了以下问题。下图说明了问题:

在此处输入图像描述

代码是:

<Window x:Class="Arelion.InternalProjects.RouteVisualization.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Route Visualization" Height="395" Width="832">
<Grid>
<Ribbon Name="ribbon">
<RibbonGroup Name="groupHome" Header="View">
<RibbonToggleButton Label="Display Map"/>
<RibbonToggleButton Label="Online"/>
</RibbonGroup>
</Ribbon>
</Grid>
</Window>
4

1 回答 1

1

包含RibbonGroup在内RibbonTab应该可以解决您的问题:

<Ribbon Name="ribbon">
   <RibbonTab>
      <RibbonGroup Name="groupHome" Header="View">
         <RibbonToggleButton Label="Display Map"/>
         <RibbonToggleButton Label="Online"/>
      </RibbonGroup>
   </RibbonTab>
</Ribbon>
于 2013-09-10T11:28:34.377 回答