For a XAML only solution, you can consider this: -
, : -
<Style x:Key="MyButtonStyle" TargetType="{x:Type Button}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Image x:Name="img" Style="{DynamicResource NormalImage}"/>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Source" TargetName="img" Value="Images\DisabledImage.png"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
,
, , , ,
<Style x:Key="NormalImage" TargetType="{x:Type Image}">
<Setter Property="Source" Value="Images/DeafultImage.png"/>
</Style>
XAML, , : -
<Button Style="{DynamicResource MyButtonStyle}" >
<Button.Resources>
<Style x:Key="NormalImage" TargetType="{x:Type Image}">
<Setter Property="Source" Value="Images/OverrideImage.png"/>
</Style>
</Button.Resources>
</Button>
, - , .
, , "NormalImage" ( ), , / . , , "NormalImage", OverrideImage.png, // , DefaultImage.png
, x: Key = "MyButtonStyle" . , WPF , . = "{x: null}", . : -
<Window.Resources>
<Style x:Key="NormalImage" TargetType="{x:Type Image}">
<Setter Property="Source" Value="Images/DeafultImage.png"/>
</Style>
<Style TargetType="{x:Type Button}">
<Setter Property="Template">
...
</Setter>
</Style>
</Window.Resources>
<Button >
<Button.Resources>
<Style x:Key="NormalImage" TargetType="{x:Type Image}">
<Setter Property="Source" Value="Images/OverrideImage.png"/>
</Style>
</Button.Resources>
</Button>
<Button Style="{x:null}>Normal Button</Button>