LostFocusEventManager.AddHandler Method (DependencyObject, EventHandler<RoutedEventArgs>)

.NET Framework (current version)
 

Adds the specified event handler, which is called when specified source raises the UIElement.LostFocus or ContentElement.LostFocus event.

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

public static void AddHandler(
	DependencyObject source,
	EventHandler<RoutedEventArgs> handler
)

Parameters

source
Type: System.Windows.DependencyObject

The source object that the raises the UIElement.LostFocus or ContentElement.LostFocus event.

handler
Type: System.EventHandler<RoutedEventArgs>

The delegate that handles the UIElement.LostFocus or ContentElement.LostFocus event.

Exception Condition
ArgumentNullException

handler is null.

Use this method to specify the event handler you want to use to subscribe to the UIElement.LostFocus or ContentElement.LostFocus event.. When you use this method, your listener object does not need to implement the IWeakEventListener interface.

.NET Framework
Available since 4.5
Return to top
Show: