共用方式為


Keyboard.AddLostKeyboardFocusHandler 方法

定義

加入 LostKeyboardFocus 附加事件的處理常式。

public:
 static void AddLostKeyboardFocusHandler(System::Windows::DependencyObject ^ element, System::Windows::Input::KeyboardFocusChangedEventHandler ^ handler);
public static void AddLostKeyboardFocusHandler (System.Windows.DependencyObject element, System.Windows.Input.KeyboardFocusChangedEventHandler handler);
static member AddLostKeyboardFocusHandler : System.Windows.DependencyObject * System.Windows.Input.KeyboardFocusChangedEventHandler -> unit
Public Shared Sub AddLostKeyboardFocusHandler (element As DependencyObject, handler As KeyboardFocusChangedEventHandler)

參數

element
DependencyObject

接聽這個事件的 UIElementContentElement

handler
KeyboardFocusChangedEventHandler

要加入的事件處理常式。

備註

這個方法提供附加屬性存取子,以便存取附加事件的程式代碼和 XAML 屬性處理 Keyboard.LostKeyboardFocus

適用於