UIElement.IsStylusDirectlyOver UIElement.IsStylusDirectlyOver UIElement.IsStylusDirectlyOver UIElement.IsStylusDirectlyOver Property


取得值,指出手寫筆位置是否與點擊測試結果相對應,該結果會將複合項目納入考量。Gets a value that indicates whether the stylus position corresponds to hit test results, which take element compositing into account. 這是相依性屬性。This is a dependency property.

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


如果手寫筆指標的項目結果與點擊測試相同,則為 true,否則為 falsetrue if the stylus pointer is over the same element result 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 (the visual tree), 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. 大部分的情況下,您不撰寫控制項,使用IsStylusOver改。For 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