Is there a way to watch WPF Routed Events?

前端 未结 2 1626
不思量自难忘°
不思量自难忘° 2021-02-02 14:49

I was wondering if there\'s a way to watch all RoutedEvents that are raised in a WPF application. A way to write some info about the events fired to the console would be prefect

2条回答
  •  隐瞒了意图╮
    2021-02-02 15:11

    Yes, but it requires some reflection. You're better off using a tool like Snoop that already does the hard lifting for you.

    In the tab Events you can see list of events, and the element that handled it.

提交回复
热议问题