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)

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.

ExceptionCondition
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.

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

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft