2012-07-25 117 views
0

我使用Fluent功能区(fluent.codeplex.com)。我想并排安排四个按钮。 我使用下面的代码:图像不显示在按钮上

<Fluent:RibbonGroupBox Header="Some Header"> 
    <Fluent:RibbonToolBar> 
     <Fluent:RibbonToolBar.LayoutDefinitions> 
      <Fluent:RibbonToolBarLayoutDefinition Size="Small"> 
       <Fluent:RibbonToolBarRow> 
        <Fluent:RibbonToolBarControlGroupDefinition> 
         <Fluent:RibbonToolBarControlDefinition Target="buttonFirst" /> 
         <Fluent:RibbonToolBarControlDefinition Target="buttonPrevious" /> 
         <Fluent:RibbonToolBarControlDefinition Target="buttonNext" /> 
         <Fluent:RibbonToolBarControlDefinition Target="buttonLast" /> 
        </Fluent:RibbonToolBarControlGroupDefinition> 
       </Fluent:RibbonToolBarRow> 
      </Fluent:RibbonToolBarLayoutDefinition> 
     </Fluent:RibbonToolBar.LayoutDefinitions> 
     <Fluent:Button Size="Small" Icon="/WpfApplication1;component/Resources/First_16.png" x:Name="buttonFirst" /> 
     <Fluent:Button Size="Small" Icon="/WpfApplication1;component/Resources/Previous_16.png" x:Name="buttonPrevious" /> 
     <Fluent:Button Size="Small" Icon="/WpfApplication1;component/Resources/Next_16.png" x:Name="buttonNext" /> 
     <Fluent:Button Size="Small" Icon="/WpfApplication1;component/Resources/Last_16.png" x:Name="buttonLast" /> 
    </Fluent:RibbonToolBar> 
</Fluent:RibbonGroupBox> 

的按钮排列正确,但按钮没有图像。哪里有问题? enter image description here (图像文件都可以)

+0

只是一个猜测 - 您是否将图像的资源类型设置为“资源”? – Zak 2012-07-25 09:31:14

+0

是的,资源类型设置为“资源” – David 2012-07-25 09:35:28

+0

我有同样的问题如何设置资源我的图像类型为“资源”? – CrApHeR 2015-11-21 15:58:47

回答

0

有时候,你需要改变“复制到输出目录”设置。我通常使用‘总是’,或者IfNewer如果你有很多,不想重建不断擦拭和复制