views:

131

answers:

2

What are main difference between Triggers and Events in WPF ? We can do all the stuffs using events, which we can do through triggers, so why we need triggers?

A: 

Triggers are for the UI, you define triggers to change some visual style of the controls using only XAML code. Events are more general pourpose and need to be coded in C#/VB.NET

ema
A: 

Triggers are declarative. They avoid all the messiness of imperative programming. You won't get null reference exceptions and such with them.

CannibalSmith