I have a UserControl
Style
for my buttons.
<Style TargetType="Button" x:Key="RoundButton">
<Style.Resources>
<Style TargetType="Border">
<Setter Property="CornerRadius" Value="3" />
</Style>
</Style.Resources>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
The rounded corners work, but when the Button
is disabled the color does not change.
<Button Width="140" Style="{DynamicResource RoundButton}"
Command="{Binding SaveCommand}" IsEnabled="{Binding HasUnsavedOdpChanges}"
HorizontalContentAlignment="Left">
Any suggestions?