UIElement.OnStylusLeave(StylusEventArgs) UIElement.OnStylusLeave(StylusEventArgs) UIElement.OnStylusLeave(StylusEventArgs) UIElement.OnStylusLeave(StylusEventArgs) Method


当此元素引发未处理的 StylusLeave 附加事件时调用。Invoked when an unhandled StylusLeave attached event is raised by this element. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

 virtual void OnStylusLeave(System::Windows::Input::StylusEventArgs ^ e);
protected virtual void OnStylusLeave (System.Windows.Input.StylusEventArgs e);
abstract member OnStylusLeave : System.Windows.Input.StylusEventArgs -> unit
override this.OnStylusLeave : System.Windows.Input.StylusEventArgs -> unit
Protected Overridable Sub OnStylusLeave (e As StylusEventArgs)


StylusEventArgs StylusEventArgs StylusEventArgs StylusEventArgs

包含事件数据的 StylusEventArgsThe StylusEventArgs that contains the event data.


此方法没有默认实现。This method has no default implementation. 因为继承中的中间类可能实现此方法, 所以建议您在实现中调用基实现。Because an intermediate class in the inheritance might implement this method, we recommend that you call the base implementation in your implementation. 您可以根据自己的要求, 在特殊处理之前或之后调用 base。You may call base either before or after your special handling, depending on your requirements.

此方法的目的类似公共语言运行时 (CLR)common language runtime (CLR)于 * 方法上的事件模式: 此方法提供了通过建立类处理程序而不是实例处理程序来处理来自派生类的匹配事件的方法。The purpose of this method is similar to 公共语言运行时 (CLR)common language runtime (CLR) event pattern On* methods: this method provides the means to handle the matching event from derived classes by establishing a class handler instead of an instance handler. 在这种情况下, 匹配事件是路由事件。In this case the matching event is a routed event. 将事件标记为已处理仍然有助于防止调用典型的实例处理程序 (未指定handledEventsToo的实例处理程序)。Marking the event as handled is still useful for preventing typical instance handlers (those that do not specify handledEventsToo) from being invoked.