語言

KeyboardDevice.Focus(IInputElement) 方法

定義

將鍵盤焦點設定在指定的 IInputElement。

public:
 System::Windows::IInputElement ^ Focus(System::Windows::IInputElement ^ element);
public System.Windows.IInputElement Focus(System.Windows.IInputElement element);
[System.Security.SecurityCritical]
public System.Windows.IInputElement Focus(System.Windows.IInputElement element);
member this.Focus : System.Windows.IInputElement -> System.Windows.IInputElement
[<System.Security.SecurityCritical>]
member this.Focus : System.Windows.IInputElement -> System.Windows.IInputElement
Public Function Focus (element As IInputElement) As IInputElement

參數

element
IInputElement

該將焦點轉向的元素。

傳回

那個有鍵盤焦點的元素。

屬性

例外狀況

適用於