Closed Moerty closed 5 years ago
Hello Moerty,
please try to add the BasedOn Property to your style (Like the lines below):
<ToggleButton>
<ToggleButton.Style>
<Style TargetType="ToggleButton" BasedOn="{StaticResource MetroToggleButton}">
<Style.Triggers>
<Trigger Property="IsChecked" Value="False">
<Setter Property="Background" Value="Black" />
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" Value="White" />
</Trigger>
</Style.Triggers>
</Style>
</ToggleButton.Style>
</ToggleButton>
I've tried this out and it worked for me.
Best regards,
Tim
Tried this too, but didn't work.
I end up using this:
BasedOn="{StaticResource MahApps.Metro.Styles.MetroToggleButton}"
Describe the bug Maybe I'm missing something, but the color of the background when the button "IsChecked" can't be changed?
To Reproduce
Expected behavior When 'IsChecked' = true, I want to see the background of the button white.