StylusEventArgs.GetStylusPoints Method (IInputElement, StylusPointDescription)

 
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 uses the specified StylusPointDescription and contains StylusPoint objects relating to the specified input element.

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

public StylusPointCollection GetStylusPoints(
	IInputElement relativeTo,
	StylusPointDescription subsetToReformatTo
)

Parameters

relativeTo
Type: System.Windows.IInputElement

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

subsetToReformatTo
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
InvalidOperationException

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.

System_CAPS_noteNote

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
Show: