UIElement.OnStylusEnter(StylusEventArgs) 方法

定义

当此元素引发未处理的 StylusEnter 附加事件时调用。 实现此方法可为此事件添加类处理。

protected:
 virtual void OnStylusEnter(System::Windows::Input::StylusEventArgs ^ e);
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)

参数

e
StylusEventArgs

包含事件数据的 StylusEventArgs

注解

此方法没有默认实现。 由于继承中的中间类可能实现此方法,因此建议在实现中调用基实现。 可以在特殊处理之前或之后调用 base,具体取决于你的要求。

此方法的用途类似于公共语言运行时 (CLR) 事件模式 On* 方法:此方法提供通过建立类处理程序而不是实例处理程序来处理派生类中的匹配事件的方法。 在这种情况下,匹配事件是路由事件。 将事件标记为已处理仍可用于防止典型实例处理程序 (未指定 handledEventsToo) 被调用。

适用于

另请参阅