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
)
You cannot use methods in XAML.

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.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2015 Microsoft