UIElement.OnStylusSystemGesture(StylusSystemGestureEventArgs) UIElement.OnStylusSystemGesture(StylusSystemGestureEventArgs) UIElement.OnStylusSystemGesture(StylusSystemGestureEventArgs) UIElement.OnStylusSystemGesture(StylusSystemGestureEventArgs) Method

定義

當未處理的 StylusSystemGesture 附加事件到達其路由中衍生自此類別的項目時叫用。Invoked when an unhandled StylusSystemGesture attached event reaches an element in its route that is derived from this class. 實作這個方法可為此事件加入類別處理。Implement this method to add class handling for this event.

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

參數

備註

這個方法沒有任何預設實作。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.

這個方法的目的是類似於通用語言執行平台 (CLR)common language runtime (CLR)上的事件模式 * 方法: 這個方法會提供方法來處理從衍生類別相符的事件所建立的類別處理常式,而不是執行個體處理常式。The purpose of this method is similar to the 通用語言執行平台 (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. On * 方法的實作模式是不同的路由事件,因為路由的事件可以引發由子項目,不一定會叫用處理常式的項目。The implementation pattern of the On* methods is different for routed events because a routed event can be raised by a child element, which is not necessarily the element that will invoke handlers. 因此,您的實作必須檢查的事件資料的來源屬性。Therefore, your implementation needs to examine the source properties of the event data. 它不應該嘗試重新引發此事件,在大部分情況下。It should not try to reraise the event in most cases.

藉由覆寫這個方法,或藉由註冊類別處理常式RegisterClassHandler,衍生的類別UIElement收到此事件路由事件時,可以呼叫私用類別處理常式方法。Either by overriding this method or by registering class handlers with RegisterClassHandler, derived classes of UIElement can call private class handler methods when the event is received along the event route. 其中的類別處理是適當的一個案例是操作事件資料,並將路由的事件標示為已處理。One scenario where class handling is appropriate is to manipulate the event data and mark the routed event as handled.

適用於

另請參閱