Difference between RoutedEventHandler and EventHandler

What's the difference between

this.Loaded += new RoutedEventHandler(MainWindow_Loaded); 

and

 childWindow.MyEvent += new EventHandler(childWindow_MyEvent); 
+7
source share
2 answers

I assume you want to know what is the difference between events and routed events. These 2 articles can help you:

https://msdn.microsoft.com/en-us/library/ms742806(v=vs.100).aspx (MSDN article)

http://joshsmithonwpf.wordpress.com/2008/03/18/understanding-routed-commands/ (excellent article on routed commands, which also contains a very good explanation of routed events)

+5
source

In short, RoutedEvents are routed. They can bubble or expand the visual tree until they hit the handler.

Standard events are just a direct subscription.

+9
source

All Articles