StylusDevice.Capture Method (IInputElement)

 

Binds input from the stylus to the specified element.

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

public bool Capture(
	IInputElement element
)

Parameters

element
Type: System.Windows.IInputElement

The element to which the stylus is bound.

Return Value

Type: System.Boolean

true if the input element is captured successfully; otherwise, false. The default is false.

Exception Condition
ArgumentNullException

element is null.

InvalidOperationException

element is neither UIElement or FrameworkContentElement.

The following example demonstrates the Capture(IInputElement) method.

// Bind stylus to tablet's input element
myStylusDevice.Capture(myStylusDevice.Target);

.NET Framework
Available since 3.0
Return to top
Show: