Get default event handler of a control.

  • Thread starter Thread starter Mr. X.
  • Start date Start date
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 :)
 
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>
 
Back
Top