共用方式為


AutomationElement.AutomationElementInformation.HasKeyboardFocus 屬性

定義

取得的值指出項目是否有鍵盤焦點。

public:
 property bool HasKeyboardFocus { bool get(); };
public bool HasKeyboardFocus { get; }
member this.HasKeyboardFocus : bool
Public ReadOnly Property HasKeyboardFocus As Boolean

屬性值

true 表示項目有鍵盤焦點,否則為 false

備註

如果容器內的元素具有焦點, HasKeyboardFocus 則容器元素也是 true。

如需詳細資訊,請參閱HasKeyboardFocusProperty

適用於