StylusDevice.GetStylusPoints Method (IInputElement)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Returns a StylusPointCollection that contains StylusPoint objects collected from the stylus.

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

public StylusPointCollection GetStylusPoints(
	IInputElement relativeTo
)

Parameters

relativeTo
Type: System.Windows.IInputElement

The IInputElement to which the (x,y) coordinates in the StylusPointCollection are mapped.

Return Value

Type: System.Windows.Input.StylusPointCollection

A StylusPointCollection that contains StylusPoint objects that the stylus collected.

Exception Condition
InvalidOperationException

relativeTo is neither UIElement or FrameworkContentElement.

The following example demonstrates how to get the StylusPointCollection from the StylusDevice.

StylusPointCollection myStylusPoints =
            myStylusDevice.GetStylusPoints(myStylusDevice.Target);
textbox1.AppendText("Got " + myStylusPoints.Count.ToString() + " packets\n");

.NET Framework
Available since 3.0
Return to top
Show: