Stylus.StylusSystemGesture 附加事件
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
使用者使用此手寫筆進行系統手勢時發生。
C#
see AddStylusSystemGestureHandler, and RemoveStylusSystemGestureHandler
see AddStylusSystemGestureHandler, and RemoveStylusSystemGestureHandler
see AddStylusSystemGestureHandler, and RemoveStylusSystemGestureHandler
下列範例示範如何判斷引發 StylusSystemGesture 事件的系統手勢。 這個範例假設有呼叫 TextBoxtextBox1
的 ,而且 StylusSystemGesture 事件已連接到事件處理程式。
C#
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 方法。 如需詳細資訊,請參閱 附加事件概觀。
標識元欄位 | StylusSystemGestureEvent |
路由策略 | 鼓 泡 |
代理人 | StylusSystemGestureEventHandler |
產品 | 版本 |
---|---|
.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 |