I’m using a ToggleButton control. I have triggers for the IsChecked and IsMouseOver properties that change the background and foreground colors. I don’t want the IsMouseOver trigger to fire if the ToggleButton is checked. Is this possible?
My current triggers for the ToggleButton:
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="Border" Property="Background" Value="{DynamicResource ControlSelectedBrush}"/>
<Setter TargetName="ToggleButtonText" Property="Foreground" Value="{DynamicResource ControlSelectedTextBrush}"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="ToggleButtonText" Property="Foreground" Value="{DynamicResource ControlHoverBrush}"/>
</Trigger>
</ControlTemplate.Triggers>
Use a
MultiTriggerand define that as an additional condition.i.e.