What are the different triggers in WPF?
问题 What are the different triggers in WPF? How do they differ and when should I use them? I've seen the following triggers: Trigger DataTrigger MultiTrigger MultiDataTrigger EventTrigger 回答1: A Trigger is typically used in a Style or ControlTemplate. It triggers on properties of the thing being templated, and sets other properties of the control (or of specific template elements). For example, you would use a Trigger on IsMouseOver to respond to the mouse being over the control, and the setters