TouchDevice::Capture Method (IInputElement^, CaptureMode)
.NET Framework (current version)
Captures a touch to the specified element by using the specified CaptureMode.
Assembly: PresentationCore (in PresentationCore.dll)
Parameters
- element
-
Type:
System.Windows::IInputElement^
The element that captures the touch.
- captureMode
-
Type:
System.Windows.Input::CaptureMode
The capture policy to use.
Return Value
Type: System::Booleantrue if the element was able to capture the touch; otherwise, false.
| Exception | Condition |
|---|---|
| ArgumentException | element is not a UIElement, UIElement3D, or ContentElement. |
A TouchDevice cannot be captured to an element if it is already captured to another element.
.NET Framework
Available since 4.0
Available since 4.0
Show: