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

属性值

如果 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.

适用于