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

屬性值

如果手寫筆位於與點擊測試相同的項目上方,則為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. 如果手寫筆改為專案的子專案或專案,而不是專案的深度複合專案,則會 false此屬性。If 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
設定為 true 的中繼資料屬性Metadata properties set to true NoneNone

適用於

另請參閱