本文介绍了RoutedEventHandler和EventHandler之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
两者之间有什么区别
this.Loaded += new RoutedEventHandler(MainWindow_Loaded);
和
childWindow.MyEvent += new EventHandler(childWindow_MyEvent);
推荐答案
我假设您想知道事件和路由事件之间的区别是什么.这2篇文章可能对您有帮助:
I assume you want to know what's the difference between Events and Routed Events. These 2 articles might help you:
https://msdn.microsoft.com /en-us/library/ms742806(v=vs.100).aspx (MSDN文章)
http://joshsmithonwpf.wordpress.com/2008/03 /18/understanding-routed-commands/(有关路由命令的出色文章,其中也包含对路由事件的很好解释)
http://joshsmithonwpf.wordpress.com/2008/03/18/understanding-routed-commands/ (a great article about Routed Commands that also contains a very nice explanation of Routed Events)
这篇关于RoutedEventHandler和EventHandler之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!