UIElement.StylusLeave 事件


手寫筆離開元素的邊界時發生。Occurs when the stylus leaves the bounds of the element.

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





StylusLeave 是使用直接事件處理路由策略的 路由事件StylusLeave 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.

雖然會 StylusLeave 在手寫筆離開專案的範圍時進行追蹤,但此事件更常報告 IsStylusOver 屬性值在這個專案上的屬性值已變更 truefalseAlthough StylusLeave tracks when the stylus leaves the bounds of an element, this event more literally reports that the IsStylusOver property value has changed from true to false on this element.

此事件 Stylus.StylusLeave 會為這個類別建立附加事件的別名,因此 StylusLeaveUIElement 繼承為基底專案時,它就是類別成員清單的一部分。This event creates an alias for the Stylus.StylusLeave attached event for this class, so that StylusLeave is part of the class members list when UIElement is inherited as a base element. 附加至事件的事件處理常式 StylusLeave 會附加至基礎 Stylus.StylusLeave 附加事件,並接收相同的事件資料實例。Event handlers that are attached to the StylusLeave event are attached to the underlying Stylus.StylusLeave 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 StylusLeaveEvent
路由策略Routing strategy 直接Direct
代理人Delegate StylusEventHandler
  • OnStylusLeave在衍生類別中覆寫以執行這個事件的類別處理。Override OnStylusLeave to implement class handling for this event in derived classes.