Capture Method (IInputElement, CaptureMode)
Collapse the table of content
Expand the table of content

TouchDevice.Capture Method (IInputElement, CaptureMode)

.NET Framework (current version)
 

Captures a touch to the specified element by using the specified CaptureMode.

Namespace:   System.Windows.Input
Assembly:  PresentationCore (in PresentationCore.dll)

public bool Capture(
	IInputElement element,
	CaptureMode captureMode
)

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.Boolean

true 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
Return to top
Show:
© 2016 Microsoft