UIElement.OnStylusLeave(StylusEventArgs) 方法

定義

當這個項目引發未處理的 StylusLeave 附加事件時叫用。Invoked when an unhandled StylusLeave attached event is raised by this element. 實作這個方法可為此事件加入類別處理。Implement this method to add class handling for this event.

protected:
 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)

參數

e
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. 視您的需求而定,您可以在特殊處理之前或之後呼叫基底。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. 將事件標示為已處理,仍有助於防止一般的實例處理常式 (不指定) 叫用的實例處理常式 handledEventsTooMarking the event as handled is still useful for preventing typical instance handlers (those that do not specify handledEventsToo) from being invoked.

適用於

另請參閱