UIElement.OnStylusEnter(StylusEventArgs) 方法
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
當這個項目引發未處理的 StylusEnter 附加事件時叫用。 實作這個方法可為此事件加入類別處理。
protected:
virtual void OnStylusEnter(System::Windows::Input::StylusEventArgs ^ e);
C#
protected virtual void OnStylusEnter(System.Windows.Input.StylusEventArgs e);
abstract member OnStylusEnter : System.Windows.Input.StylusEventArgs -> unit
override this.OnStylusEnter : System.Windows.Input.StylusEventArgs -> unit
Protected Overridable Sub OnStylusEnter (e As StylusEventArgs)
包含事件資料的 StylusEventArgs。
這個方法沒有預設實作。 由於繼承中的中繼類別可能會實作此方法,因此建議您在實作中呼叫基底實作。 視需求而定,您可以在特殊處理之前或之後呼叫基底。
這個方法的用途類似于 Common Language Runtime (CLR) 事件模式 On* 方法:此方法提供方法,透過建立類別處理常式而非實例處理常式來處理衍生類別的比對事件。 在此情況下,比對事件是路由事件。 將事件標示為已處理仍然很實用,以防止一般實例處理常式 (未指定 handledEventsToo
) 叫用的處理常式。
產品 | 版本 |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9, 10 |