1.

Explain triggers and write its different types.

Answer»

In WPF, triggers are commonly used in Style and Control Templates. The visual effect of a WPF element is changed by triggers when a property or data changes or when an event takes place. The WPF trigger is a very important feature that allows us to MODIFY the visual effect of controls or elements. Therefore, you are able to DYNAMICALLY modify the APPEARANCE and/or behaviour of your control without CREATING a new one. 

Triggers can be divided into three categories:  

  • Property Triggers: A change in one property will CAUSE an animated or immediate change in another property.
  • Data Triggers: Data triggers are triggered when certain conditions are met by bound data.
  • Event Triggers: These triggers take action when a specific event occurs.


Discussion

No Comment Found