TouchDevice.Captured 속성


TouchDevice를 캡처한 요소를 가져옵니다.Gets the element that captured the TouchDevice.

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

속성 값

TouchDevice를 캡처한 요소입니다.The element that captured the TouchDevice.


다음 예제에서는 처리 합니다 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)
' 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

적용 대상