Reputation: 13090
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?
Upvotes: 1
Views: 2135
Reputation: 4820
Triggers are declarative. They avoid all the messiness of imperative programming. You won't get null reference exceptions and such with them.
Upvotes: 1
Reputation: 5783
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
Upvotes: 0