With the trigger window you can create either
The simplest form are property triggers. Property triggers are needed when one dependency property is to change when another has changed. Usually these are so-called "Is properties" that change their Boolean value when a mouse or keyboard event is triggered.
- To add a simple property trigger, click the Property button. To add a multiple property trigger, click the "Multi" button.
- Select the event property in the "Triggerdata" tab and define the value to which you want to react.
- Switch to the "Setter" tab and define which graphical property should change.
Then close the trigger window and switch to the XAML editor. The following code was generated for our rectangle example:
Translated this means: "If the mouse pointer is over the rectangle, change the fill color to yellow."
In practice, property triggers are not needed that often. Rather, data triggers are used, which are discussed in more detail in the following subchapter.