So i've got a custom user control. I have an event (SelectionChanged) and I'm wanting to have who ever uses my control to do the following to hook up the event:
- drag the control to the page
- in designer mode, click on the control
- view the controls event handlers (from the properties window)
- find the SelectionChanged event
- double click and let visual studio create the code behind function and the wire-up on the aspx page.
How do i get this done? I've got the control setup so that the user can manually type in the event wire-up and code behind event by hand, but i want Visual Studio to do this.
Currently, when the a developer has dropped my control on the page, they can click on it and see the properties but no events are available (the lightning bolt isn't even there).
My events are public. Here they are:
public delegate void SelectionChangedDelegate(object sender, SelectionChangedEventArgs e);
public event SelectionChangedDelegate SelectionChangedEvent;