ContentElement.IsStylusDirectlyOver 属性

定义

获取一个值,该值指示在考虑元素组合的情况下,触笔的位置是否与命中测试结果相对应。Gets a value that indicates whether the stylus position corresponds to hit test results, which take element compositing into account.

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

属性值

Boolean

如果触笔与命中测试位于同一元素上,则为 true;否则为 falsetrue if the stylus is over the same element as a hit test; otherwise, false. 默认为 falseThe default is false.

实现

注解

与不同的 IsStylusOver 是,仅 true 当触笔位于元素上时,此属性才适用。Unlike IsStylusOver, this property is only true if the stylus is over the element. 如果触笔位于子元素上或属于元素的更深层组合的元素,则此属性将为 falseIf the stylus is instead over a child element or over elements that are part of an element's deeper compositing, this property will be false.

除非你知道控件是如何组合的 (例如,你在定义) 的控件的自定义控件模板中使用此属性,则此属性可能会返回意外的结果。Unless you know how a control is composited (for example, you use this property in a custom control template for a control that you define), this property might return unexpected results. 对于不是创作控件的大多数情况,请改用 IsStylusOverFor most scenarios where you are not authoring controls, use IsStylusOver instead.

如果此元素具有触笔捕获,而此属性 true 在捕获时,则此属性将保留, true 直到触笔捕获丢失并且触笔不在其边界上。If this element has stylus capture and this property is true at the time of capture, this property remains true until stylus capture is lost and the stylus is not over its bounds.

触摸、鼠标和触笔输入在特定关系中存在。Touch, mouse, and stylus input exist in a particular relationship. 有关详细信息,请参阅 输入概述For more information, see Input Overview.

依赖项属性信息Dependency Property Information

标识符字段Identifier field IsStylusDirectlyOverProperty
元数据属性设置为 trueMetadata properties set to true None

适用于

另请参阅