I created a custom UserControl
in my WPF project that has some custom events. The events work with out any problem but there is a small issue with it. In my VS 2015 the control event handlers show "0 references" (CodeLens - this is a VS 2013-15 feature) under the parent window, even though they are hooked to the control in the .xaml file. Generally VS 2015 will show the count and all the references on mouse click (please see the image below).
In the screenshot the resultActionView is my user control. As you can see the event of the control shows "0 references" which is not true. Is there some attributes that needs to be added to the event handlers, or what am I missing?
An example of event handler declaration in the UserControl
:
public event EventHandler<RoutedEventArgs> AviewDeleteSelectionClick;
Does anyone know why the user control event handlers shows "0 references"?