2

I added icons to my buttons in my WPF ClickOnce app but they are missing after deployment. They show up fine in debug in Visual Studio 2012. The icons are set as follows:

Build Action: Content

Copy to Output Directory: Copy if newer

This is following another post I saw that says to do this to use them in the following way in XAML:

<Button Style="{StaticResource LinkButton}" Command="{Binding PullForwardCommand}">
    <StackPanel Orientation="Horizontal">
        <Image Source="pack://siteoforigin:,,,/Resources/Icons/pullfwd.png" />
        <TextBlock Text="Pull Forward" Style="{StaticResource MenuTB}"/>
    </StackPanel>
</Button>

I did see all the icons are shown in a folder Resources/Icons (as named in my project) where the app is published (albeit as forward.png.deploy).

How do i get the icons to show up in the deployed app?

4

1 回答 1

2

将图标属性更改为

构建操作:资源

复制到输出目录:不要复制

希望这应该工作

于 2013-06-05T18:47:51.980 回答