WeakEventManager(Of TEventSource, TEventArgs).AddHandler Method (TEventSource, String, EventHandler(Of TEventArgs))

.NET Framework (current version)
 

Adds the specified event handler to the specified event.

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

Public Shared Sub AddHandler (
	source As TEventSource,
	eventName As String,
	handler As EventHandler(Of TEventArgs)
)

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(Of TEventArgs)

The delegate that handles the event.

.NET Framework
Available since 4.5
Return to top
Show: