StylusDevice.GetStylusPoints Method (IInputElement)

 

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: