語言

Keyboard.AddPreviewKeyboardInputProviderAcquireFocusHandler 方法

定義

新增一個處理者來處理 PreviewKeyboardInputProviderAcquireFocus 附加事件。

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

參數

element
DependencyObject

那個 UIElement 會監聽這個事件的或 ContentElement 。

handler
KeyboardInputProviderAcquireFocusEventHandler

事件處理程式將被加入。

備註

此方法提供附加屬性存取器,用於存取程式碼及處理 Keyboard.PreviewKeyboardInputProviderAcquireFocus 附加事件的 XAML 屬性。

適用於