按钮上不显示图像

时间:2012-07-25 08:32:55

标签: wpf image xaml button fluent

我使用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 (图像文件可用)

1 个答案:

答案 0 :(得分:0)

有时您需要更改“复制到输出目录”设置。我通常使用“始终”。或者如果您有很多并且不希望重建经常擦除和重新复制,则为IfNewer。

相关问题