-
Jun 18th, 2015, 12:25 PM
#1
Handling Events from a User Control
I posted this example in another thread and thought others might find it useful. It's strictly an example that shows how to handle an event in a UserControl, passing it through the UC and to the hosting form. It's a simple and contrived example. It contains a simple UC that's a checkbox, a label and a custom event, then a form that creates a bunch of instances of the UC, and sets the handler for each one. As you click the checkboxes it will tell you the name of the UC you clicked and if it was dumped (checkbox is set) or reset (checkbox was cleared).
There's comments peppered through out the code... I recommend starting with the code behind the UC first... that's where it all starts.
EventSample.zip
Hopefully some one else will find it useful.
-tg
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|