Many times we would want a style property to execute under certain conditions. Trigger’s help you to define condition under which the style values will be set.
For instance in the below XAML code we have style trigger defined for button which set’s background color to “Red” if there is focus on the button or else the back ground color is set to “Aqua”.
<Style x:Key="myStyle" TargetType="Button">
<Style.Triggers>
<Trigger Property="IsFocused" Value="True">
<Setter Property="Background" Value="Red"/>
</Trigger>
</Style.Triggers>
<Setter Property="Background" Value="Aqua" />
</Style>