共用方式為


Keyboard.AddPreviewLostKeyboardFocusHandler 方法

定義

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

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

參數

element
DependencyObject

接聽這個事件的 UIElementContentElement

handler
KeyboardFocusChangedEventHandler

要加入的事件處理常式。

備註

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

適用於