UIElement.HasEffectiveKeyboardFocus 屬性

定義

取得值,指出 UIElement 是否具有焦點。Gets a value that indicates whether the UIElement has focus.

protected public:
 virtual property bool HasEffectiveKeyboardFocus { bool get(); };
protected internal virtual bool HasEffectiveKeyboardFocus { get; }
member this.HasEffectiveKeyboardFocus : bool
Protected Friend Overridable ReadOnly Property HasEffectiveKeyboardFocus As Boolean

屬性值

Boolean

如果 UIElement 具有焦點,則為 true;否則為 falsetrue if the UIElement has focus; otherwise, false.

備註

子類別可以覆寫這個屬性,以指定專案具有鍵盤焦點的時機。Subclasses can override this property to specify when the element has keyboard focus. 當您 UIElement 的包含可具有鍵盤焦點的專案,而您想要讓您的專案報告有焦點時,這非常有用。This is useful when your UIElement contains elements that can have keyboard focus and you want your element to report that it has focus.

適用於