Get default event handler of a control.

M

Mr. X.

Hello.

How can I get/set the default event handler of a specific control ? (Any
other event ?)
I need a generic solution (such as reflection for setting properties
values), please.

Thanks :)
 
H

Herfried K. Wagner [MVP]

Am 27.06.2010 23:17, schrieb Mr. X.:
How can I get/set the default event handler of a specific control ? (Any
other event ?)
I need a generic solution (such as reflection for setting properties
values), please.

What's the default event handler?

If you want to identify the default event, just check the list of events
for the event which is marked using the 'DefaultEvent' attribute. This
can be done by reflection.

DefaultEventAttribute Class (System.ComponentModel)
<URL:http://msdn.microsoft.com/en-us/library/system.componentmodel.defaulteventattribute.aspx>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top