StylusEventArgs::GetStylusPoints Method (IInputElement^, StylusPointDescription^)


Returns a StylusPointCollection that uses the specified StylusPointDescription and contains StylusPoint objects relating to the specified input element.

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

StylusPointCollection^ GetStylusPoints(
	IInputElement^ relativeTo,
	StylusPointDescription^ subsetToReformatTo


Type: System.Windows::IInputElement^

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

Type: System.Windows.Input::StylusPointDescription^

The StylusPointDescription to be used by the StylusPointCollection.

Return Value

Type: System.Windows.Input::StylusPointCollection^

A StylusPointCollection that contains StylusPoint objects collected during an event.

Exception Condition

relativeTo is neither UIElement or FrameworkContentElement.

subsetToReformatTo must be compatible with the Description property of the StylusPointCollection from the GetStylusPoints(IInputElement^) method. Use the GetCommonDescription method to get a StylusPointDescription before calling the GetStylusPoints(IInputElement^, StylusPointDescription^) method.


GetStylusPoints uses constraints from the StylusPointCollection in StylusEventArgs, even if the constraints in subsetToReformatTo are different. For example, if subsetToReformatTo uses NormalPressure values of 0 and 1023 but StylusEventArgs uses values of 0 and 255, GetStylusPoints returns a StylusPointDescription containing the values 0 and 255.

.NET Framework
Available since 3.0
Return to top