AutomationPeer.HasKeyboardFocus 方法

定義

取得值,這個值表示與這個自動化對等個體相關聯的項目目前是否有鍵盤焦點。Gets a value that indicates whether the element that is associated with this automation peer currently has keyboard focus.

public:
 bool HasKeyboardFocus();
public bool HasKeyboardFocus ();
member this.HasKeyboardFocus : unit -> bool
Public Function HasKeyboardFocus () As Boolean

傳回

Boolean

true 表示項目有鍵盤焦點,否則為 falsetrue if the element has keyboard focus; otherwise, false.

例外狀況

目前正在公開呼叫此方法。A public call to this method is currently in progress.

適用於