ContentElement.IsKeyboardFocusWithin 屬性

定義

取得值,這個值表示鍵盤焦點是否在項目內或子項目內的任意處。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.

實作

備註

除非衍生的類別已覆寫 OnIsKeyboardFocusWithinChanged 以隱藏事件,否則此屬性值的變更通常會引發 IsKeyboardFocusWithinChanged 事件。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
設定為 true 的中繼資料屬性Metadata properties set to true NoneNone

適用於