แก้ไข

แชร์ผ่าน


LostFocusEventManager.AddHandler Method

Definition

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

public:
 static void AddHandler(System::Windows::DependencyObject ^ source, EventHandler<System::Windows::RoutedEventArgs ^> ^ handler);
public static void AddHandler (System.Windows.DependencyObject source, EventHandler<System.Windows.RoutedEventArgs> handler);
static member AddHandler : System.Windows.DependencyObject * EventHandler<System.Windows.RoutedEventArgs> -> unit
Public Shared Sub AddHandler (source As DependencyObject, handler As EventHandler(Of RoutedEventArgs))

Parameters

source
DependencyObject

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

handler
EventHandler<RoutedEventArgs>

The delegate that handles the LostFocus or LostFocus event.

Exceptions

handler is null.

Remarks

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.

Applies to