StylusPointCollection Constructor (IEnumerable<StylusPoint>)

 

Initializes a new instance of the StylusPointCollection class with the specified StylusPoint objects.

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

public StylusPointCollection(
	IEnumerable<StylusPoint> stylusPoints
)

Parameters

stylusPoints
Type: System.Collections.Generic.IEnumerable<StylusPoint>

A generic IEnumerable of type StylusPoint to add to the StylusPointCollection.

Exception Condition
ArgumentNullException

stylusPoints is null.

ArgumentException

The length of points is 0.

-or-

The StylusPoint objects in stylusPoints have incompatible StylusPointDescription objects.

The following example creates a StylusPointCollection.

StylusPoint stylusPoint1 =  new StylusPoint(100, 100, .5f);
StylusPoint stylusPoint2 = new StylusPoint(200, 200, .35f);

StylusPointCollection points = new StylusPointCollection(
    new StylusPoint[] { stylusPoint1, stylusPoint2 });

.NET Framework
Available since 3.0
Return to top
Show: