UIElement.StylusEnter 事件


手寫筆進入此元素的邊界時發生。Occurs when the stylus enters the bounds of this element.

 virtual event System::Windows::Input::StylusEventHandler ^ StylusEnter;
public event System.Windows.Input.StylusEventHandler StylusEnter;
member this.StylusEnter : System.Windows.Input.StylusEventHandler 
Public Custom Event StylusEnter As StylusEventHandler 



StylusEnter 是使用直接事件處理路由策略的路由事件StylusEnter is a routed event that uses the direct event handling routing strategy. 直接路由事件不會沿著路由引發;相反地,它們會在引發它們的相同專案中進行處理。Direct routed events are not raised along a route; instead, they are handled in the same element where they are raised. 不過,它們會啟用路由事件行為的其他層面,例如樣式中的事件觸發程式。However, they do enable other aspects of routed event behavior, such as event triggers in styles.

雖然 StylusEnter 會在手寫筆進入專案的範圍時追蹤,但此事件會更常報告 IsStylusOver 屬性值已從 false 變更為此元素上的 trueAlthough StylusEnter tracks when the stylus enters the bounds of an element, this event more literally reports that the IsStylusOver property value has changed from false to true on this element.

這個事件會為這個類別建立 Stylus.StylusEnter 附加事件的別名,因此,當 UIElement 繼承為基底專案時,StylusEnter 就是類別成員清單的一部分。This event creates an alias for the Stylus.StylusEnter attached event for this class, so that StylusEnter is part of the class members list when UIElement is inherited as a base element. 附加至 StylusEnter 事件的事件處理常式會附加至基礎 Stylus.StylusEnter 附加事件,並接收相同的事件資料實例。Event handlers that are attached to the StylusEnter event are attached to the underlying Stylus.StylusEnter attached event and receive the same event data instance.

觸控、滑鼠和手寫筆輸入存在於特定的關聯性中。Touch, mouse, and stylus input exist in a particular relationship. 如需詳細資訊,請參閱輸入總覽For more information, see Input Overview.

路由事件資訊Routed Event Information

識別碼欄位Identifier field StylusEnterEvent
路由策略Routing strategy 直接Direct
Delegate - 委派Delegate StylusEventHandler
  • 覆寫 OnStylusEnter,以在衍生類別中為這個事件執行類別處理。Override OnStylusEnter to implement class handling for this event in derived classes.