How to find a list of events using Debugger (VS Professional 2012)?

Well, I cannot find any help for my question, and stackoverflow also has nothing, or I did not know how to look for it (please correct me if I am wrong, and I will close this question).

In my program, I have Gridone that has several events that were dropped in the code:

public Grid _grid = new Grid();
_grid.MouseLeftButtonDown += new MouseButtonEventHandler(MyMethod);
//and a few more events...

Now, during my launch of the program, I saw some strange behavior that could come only from some events, so I set a breakpoint and stopped the program to use the debugger.

Is there a list that I can find somewhere that lists all current member events _grid, so I can check that unwanted events have not been deleted yet?

+5
source share
1 answer

Update 2

, WPF (.. UIElement) add/remove, , -= += (.. "" ). , "" , (, MouseLeftButtonDownEvent += somehandler;, . , - , . (RoutedEventHandlerInfo, FWIW) (UIElement.EventHandlersStore._entries, FWIW). , , QuickWatch:

grid.EventHandlersStore._entries[
    new RoutedEventHandlerInfo(UIElement.MouseLeftButtonDownEvent, false)]

.

, . (, ..), . , , . :

enter image description here

, MyEvent "" t_MyEvent .

Update: , , . , . :

enter image description here

.. , t_MyEvent t_MyEvent2 MyEvent. , MyEvent null.

a >

+4

All Articles