ContentElement.IsKeyboardFocusWithin ContentElement.IsKeyboardFocusWithin ContentElement.IsKeyboardFocusWithin ContentElement.IsKeyboardFocusWithin Property

定義

取得值,這個值表示鍵盤焦點是否在項目內或子項目內的任意處。Gets a value that indicates whether keyboard focus is anywhere within the element or child elements.

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

屬性值

如果鍵盤焦點在項目或其子項目上,則為 true;否則為 falsetrue if keyboard focus is on the element or its child elements; otherwise, false. 預設為 falseThe default is false.

實作

備註

這個屬性值的變更通常會引發IsKeyboardFocusWithinChanged事件,除非在衍生的類別已覆寫OnIsKeyboardFocusWithinChanged隱藏的事件。Changes to the value of this property typically raise the IsKeyboardFocusWithinChanged event, unless a derived class has overridden OnIsKeyboardFocusWithinChanged to suppress the event.

您未設定此屬性直接,但您也可以呼叫的項目設定焦點Focus,或藉由MoveFocus要求。You do not set this property directly, but you can set the focus to the element by calling Focus, or by making a MoveFocus request. 這些方法會呼叫其中一種方法可能會變更這個屬性值。Either of these method calls might change this property value.

相依性屬性資訊Dependency Property Information

識別項欄位Identifier field IsKeyboardFocusWithinProperty
若要設定的中繼資料屬性 trueMetadata properties set to true None

適用於