I have the following Stylein my App.xaml:
<Style x:Key="BrowseBtn" TargetType="Button">
<Setter Property="Content">
<Setter.Value>
<Image Source="pack://application:,,,/Resources/BrowseIcon.png" />
</Setter.Value>
</Setter>
</Style>
I use this style in the Windowfollowing way:
<Button x:Name="btnBrowseCampaigns" Grid.Row="0" Style="{StaticResource BrowseBtn}" />
<Button x:Name="btnBrowseDatabase" Grid.Row="1" Style="{StaticResource BrowseBtn}" />
As you can see, there is no obvious difference between the two buttons, but in the designer (and at runtime) only one of these buttons shows an icon. Is this a mistake or what?
source
share