2012-07-25 115 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如果你有很多,不想重建不斷擦拭和複製