Stylus.StylusSystemGesture 附加事件
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
当用户使用此触笔进行系统手势时发生。
see AddStylusSystemGestureHandler, and RemoveStylusSystemGestureHandler
see AddStylusSystemGestureHandler, and RemoveStylusSystemGestureHandler
see AddStylusSystemGestureHandler, and RemoveStylusSystemGestureHandler
示例
以下示例演示如何确定引发 StylusSystemGesture 事件的系统手势。 此示例假定有一个 TextBox 调用 textBox1 ,并且该 StylusSystemGesture 事件已连接到事件处理程序。
private void textbox1_StylusSystemGesture(object sender, StylusSystemGestureEventArgs e)
{
textbox1.AppendText(e.SystemGesture.ToString() + "\n");
}
Private Sub textbox1_StylusSystemGesture(ByVal sender As Object, _
ByVal e As StylusSystemGestureEventArgs) Handles textbox1.StylusSystemGesture
textbox1.AppendText(e.SystemGesture.ToString() & vbLf)
End Sub
注解
这是附加事件。 WPF 将附加事件实现为路由事件。 附加事件本质上是一个 XAML 语言概念,用于引用在对象上处理的事件,这些事件本身不会定义事件。 WPF 进一步扩展了附加事件的功能,允许它遍历路由。 附加事件在代码中没有直接处理语法;若要在代码中附加路由事件的处理程序,请使用指定的 Add*Handler 方法。 有关详细信息,请参阅 附加事件概述。
路由事件信息
| Item | 价值 |
|---|---|
| 标识符字段 | StylusSystemGestureEvent |
| 路由策略 | 鼓 泡 |
| 委托人 | StylusSystemGestureEventHandler |