.NET Framework - Get default event handler of a control.

Asked By Mr. X. on 27-Jun-10 05:17 PM
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 :)


Herfried K. Wagner [MVP] replied to Mr. X. on 27-Jun-10 05:39 PM
Am 27.06.2010 23:17, schrieb Mr. X.:

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)

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>
Mr. X. replied to Herfried K. Wagner [MVP] on 28-Jun-10 01:23 PM
Thanks :)