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, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft