Style, ControlTemplate, and DataTemplate all have a triggers collection. A DataTrigger allows you to set property values when the property value of the data object matches a specified Value. For example, if you are displaying a list of Employee objects, you may want the foreground color to be different based on each Employee's current attendance. (For example, Employees who are currently on vacation are displayed with a purple foreground.) In some scenarios it may be more suitable to create a converter or to use a DataTemplateSelector. For more information, see the Data Templating Overview.
Note that you must specify both the Binding and Value properties on a DataTrigger for the data trigger to be meaningful. If one or both of the properties are not specified, an exception is thrown.
The Setters property of a DataTrigger object can only consist of Setter objects. Adding a Setter child to a DataTrigger object implicitly adds it to the SetterBaseCollection for the DataTrigger object. EventSetter objects are not supported; only Style..::.Setters supports EventSetter objects.