I have a style
<Style x:Key="HomeButtonStyle" TargetType="Button">
<Setter Property="Height" Value="32"/>
<Setter Property="Width" Value="32"></Setter>
<Setter Property="Content">
<Setter.Value>
<Image Source="/Images/HOME.png"></Image>
</Setter.Value>
</Setter>
</Style>
and I have some xaml in a control
<StackPanel Grid.Row="0" Orientation="Horizontal">
<Button Style="{DynamicResource HomeButtonStyle}" />
<Button Style="{DynamicResource HomeButtonStyle}" />
<Button Style="{DynamicResource HomeButtonStyle}" />
<Button Style="{DynamicResource HomeButtonStyle}" />
</StackPanel>
However the image is only shown in the last button.
My questions are why? and how to make the image show in all the buttons?
In your style you should set
ContentTemplateinstead ofContentdirectly.