Many times we want style triggers to be executed when multiple conditions are true. For example let’s say we have a button we want the button background to be set to “RED” when there is focus on the button and when somebody moves the mouse on the button.
In other situations the back ground color should be set to “AQUA”.So to achieve such multiple AND conditions we can use “MultiTrigger” XAML element as shown in the below XAML code. Multiple AND conditions needs to be defined in “MultiTrigger.Conditions” tag and the property which needs to be modified in “MultiTrigger.Setters” tag.
<Style x:Key=”myStyle” TargetType=”Button”>
<Condition Property=”IsFocused” Value=”True” />
<Condition Property=”IsMouseOver” Value=”True” />
<Setter Property=”Background” Value=”Red” />
<Setter Property=”Background” Value=”Aqua” />
Below is an awesome WPF video which discusses about difference between WPF and Winforms. Do not miss it.