TouchEventArgs.TouchDevice TouchEventArgs.TouchDevice TouchEventArgs.TouchDevice TouchEventArgs.TouchDevice Property


イベントを生成したタッチを取得します。Gets the touch that generated the event.

 property System::Windows::Input::TouchDevice ^ TouchDevice { System::Windows::Input::TouchDevice ^ get(); };
public System.Windows.Input.TouchDevice TouchDevice { get; }
member this.TouchDevice : System.Windows.Input.TouchDevice
Public ReadOnly Property TouchDevice As TouchDevice


イベントを生成したタッチ。The touch that generated the event.

次の例ではTouchUpCanvasで発生するイベントを処理します。The following example handles the TouchUp events that occur on a Canvas. Capturedプロパティをチェックして、イベントを発生させたデバイスがCanvasにキャプチャされていることを確認します。It checks the Captured property to verify that the device that raised the event is captured to the Canvas. の場合は、が解放されます。TouchDeviceIf it is, the TouchDevice is released.

この例は、 TouchDeviceクラスの概要で使用できる大規模な例の一部です。This example is part of a larger example that is available in the TouchDevice class overview.

private void canvas_TouchUp(object sender, TouchEventArgs e)
    Canvas _canvas = (Canvas)sender as Canvas;
    if (_canvas != null && e.TouchDevice.Captured == _canvas)
' Touch Up
Private Sub canvas_TouchUp(ByVal sender As System.Object, ByVal e As System.Windows.Input.TouchEventArgs)
    Dim _canvas As Canvas = CType(sender, Canvas)
    If (_canvas IsNot Nothing AndAlso e.TouchDevice.Captured Is _canvas) Then

    End If
End Sub