ContentElement.CaptureTouch(TouchDevice) Method


Tenta forçar a captura de um toque para esse elemento.Attempts to force capture of a touch to this element.

 bool CaptureTouch(System::Windows::Input::TouchDevice ^ touchDevice);
public bool CaptureTouch (System.Windows.Input.TouchDevice touchDevice);
member this.CaptureTouch : System.Windows.Input.TouchDevice -> bool
Public Function CaptureTouch (touchDevice As TouchDevice) As Boolean



O dispositivo a ser capturado.The device to capture.



true se o toque especificado for capturado para esse elemento; caso contrário, false.true if the specified touch is captured to this element; otherwise, false.


touchDevice é null.touchDevice is null.


CaptureTouch retornará false se a TouchDevice estiver capturada no momento para outro elemento.CaptureTouch will return false if the TouchDevice is currently captured to another element.

Se CaptureTouch retornar true, o evento GotTouchCapture será gerado.If CaptureTouch returns true, then the GotTouchCapture event is raised.

Para liberar a captura de um único toque desse elemento, use o método ReleaseTouchCapture e especifique o dispositivo de toque a ser liberado.To release capture of a single touch from this element, use the ReleaseTouchCapture method and specify the touch device to release. Para liberar todos os toques deste elemento, use o método ReleaseAllTouchCaptures.To release all touches from this element, use the ReleaseAllTouchCaptures method.

Applies to

See also