From: Mr. X. on
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 :)

From: Herfried K. Wagner [MVP] on
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>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
From: Mr. X. on
Thanks :)