Discussion on the various types of Triggers available in WPF, including
Triggers allow any class that derives from
FrameworkContentElement to set or change their properties based on certain conditions defined in the trigger. Basically, if an element can be styled, it can be triggered as well.
EventTriggermust be defined within a
EventTriggermay be defined in either a
<Style>element, or a control's
<Trigger>elements may contain any number of
<Setter>elements. These elements are responsible for setting properties on the containing element when the
<Trigger>element's condition is met.
<Setter>element will not take effect, even if the trigger condition has been met. Consider the markup
<TextBlock Text="Sample">. The
Textproperty of the proceeding code will never change based on a trigger because root property definitions take precidence over properties defined in styles.