InvokeEventHandler Method
Collapse the table of content
Expand the table of content

SelectionChangedEventArgs.InvokeEventHandler Method (Delegate, Object)


Performs the proper type casting to call the type-safe SelectionChangedEventHandler delegate for the SelectionChanged event.

Namespace:   System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

protected override void InvokeEventHandler(
	Delegate genericHandler,
	object genericTarget


Type: System.Delegate

The handler to invoke.

Type: System.Object

The current object along the event's route.

The following example creates a ListBox and subscribes to the SelectionChanged event. It uses the SelectionChangedEventArgs to find the selected item in the ListBox.

.NET Framework
Available since 3.0
Return to top
© 2015 Microsoft