Search code examples
wpfeventsrouted-events

What is the difference between triggers and events in WPF?


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?


Solution

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