我正在尝试使用流畅功能区中的布局定义。我遇到的问题是它没有在第一个Group定义中的按钮上显示图标。下面是相应的代码片段:
<Fluent:RibbonToolBar>
<Fluent:RibbonToolBar.LayoutDefinitions>
<Fluent:RibbonToolBarLayoutDefinition Size="Large">
<Fluent:RibbonToolBarRow>
<Fluent:RibbonToolBarControlGroupDefinition>
<Fluent:RibbonToolBarControlDefinition Target="buttonCameraLock" />
</Fluent:RibbonToolBarControlGroupDefinition>
<Fluent:RibbonToolBarControlGroupDefinition>
<Fluent:RibbonToolBarControlDefinition Target="buttonPanMode" />
<Fluent:RibbonToolBarControlDefinition Target="buttonRoamMode" />
</Fluent:RibbonToolBarControlGroupDefinition>
</Fluent:RibbonToolBarRow>
</Fluent:RibbonToolBarLayoutDefinition>
</Fluent:RibbonToolBar.LayoutDefinitions>
<Fluent:Button x:Name="buttonCameraLock"
Icon="histogram_small.png"
HorizontalAlignment="Center"
SizeDefinition="Small" />
<Fluent:Button x:Name="buttonPanMode"
Icon="histogram_small.png"
HorizontalAlignment="Center"
SizeDefinition="Small" />
<Fluent:Button x:Name="buttonRoamMode"
Icon="histogram_small.png"
HorizontalAlignment="Center"
SizeDefinition="Small" />
</Fluent:RibbonToolBar>在本例中,第一个按钮存在,但没有图标。如果我将它们全部放在一个组中,则所有按钮都没有图标。
发布于 2012-07-27 20:07:03
我找到了这个问题的解决方案。为了简洁起见,我在代码片段中省略了图标是用相对路径设置的。这显然是一个已知的bug。将它们设置为硬编码路径解决了问题。
http://fluent.codeplex.com/workitem/18947
https://stackoverflow.com/questions/11676630
复制相似问题