Stylus.PreviewStylusButtonUp 附加事件

定義

使用者放開手寫筆上其中一個按鈕時發生。

see AddPreviewStylusButtonUpHandler, and RemovePreviewStylusButtonUpHandler
see AddPreviewStylusButtonUpHandler, and RemovePreviewStylusButtonUpHandler
see AddPreviewStylusButtonUpHandler, and RemovePreviewStylusButtonUpHandler

範例

下列範例示範如何判斷引發事件的按鈕 PreviewStylusButtonUp 。 此範例假設有一個 TextBox 呼叫 textBox1PreviewStylusButtonUp 而且事件已連線到事件處理程式。

void textbox1_PreviewStylusButtonUp(object sender, StylusButtonEventArgs e)
{
    textbox1.AppendText(e.StylusButton.Name + "\n");
}
Private Sub textbox1_PreviewStylusButtonUp(ByVal sender As Object, _
    ByVal e As StylusButtonEventArgs) Handles textbox1.PreviewStylusButtonUp

    textbox1.AppendText(e.StylusButton.Name & vbLf)

End Sub

備註

這是附加事件。 WPF 會將附加事件實作為路由事件。 附加事件基本上是 XAML 語言概念,用來參考未自行定義事件之物件上所處理的事件。 WPF 會進一步擴充附加事件的功能,使其能夠周遊路由。 附加事件在程式代碼中沒有直接處理語法;若要在程式代碼中附加路由事件的處理程式,請使用指定的 Add*Handler 方法。 如需詳細資訊,請參閱 附加事件概觀

路由事件資訊

標識元欄位 PreviewStylusButtonUpEvent
路由策略 隧道
代理人 StylusButtonEventHandler

適用於

另請參閱