AddHandler Method
Collapse the table of content
Expand the table of content

WeakEventManager<TEventSource, TEventArgs>::AddHandler Method (TEventSource, String^, EventHandler<TEventArgs>^)

.NET Framework (current version)
 

Adds the specified event handler to the specified event.

Namespace:   System.Windows
Assembly:  WindowsBase (in WindowsBase.dll)

public:
static void AddHandler(
	TEventSource source,
	String^ eventName,
	EventHandler<TEventArgs>^ handler
)

Parameters

source
Type: TEventSource

The source object that raises the specified event.

eventName
Type: System::String^

The name of the event to subscribe to.

handler
Type: System::EventHandler<TEventArgs>^

The delegate that handles the event.

.NET Framework
Available since 4.5
Return to top
Show:
© 2016 Microsoft