I am trying to create a set of buttons with the state turned off or on, in most cases a check box without checking. Ideally, I want the color to change to display two different states (red), green (on). I tried to install a control template, but it only changes the color for the selection, and then returns to the original color when the mouse leaves the button nearby.
<ControlTemplate.Triggers> <Trigger Property="IsPressed" Value="True"> <Setter Property="Background" TargetName="Background" Value="Green"/> </Trigger> </ControlTemplate.Triggers>
wonea source share