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

정의

이벤트를 생성한 터치를 가져옵니다.Gets the touch that generated the event.

public:
 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.

예제

다음 예제에서는 처리 합니다 TouchUp 에서 일어나는 이벤트를 Canvas입니다.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. 이 경우는 TouchDevice 해제 됩니다.If 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)
    {
        _canvas.ReleaseTouchCapture(e.TouchDevice);
    }
}
' 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
        _canvas.ReleaseTouchCapture(e.TouchDevice)

    End If
End Sub

적용 대상