Button icons missing after ClickOnce deployment

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?

Upvotes: 2

Views: 1618

Answers (1)

Jasti
Jasti

Reputation: 947

Change the Icon properties to

Build Action : Resource

Copy to Output Directory : Do not Copy

Hope this should work

Upvotes: 2

Related Questions