StylusPointCollection Constructor (StylusPointDescription^, Int32)

 

Initializes a new instance of the StylusPointCollection class that is the specified size and contains the properties specified in the StylusPointDescription.

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

public:
StylusPointCollection(
	StylusPointDescription^ stylusPointDescription,
	int initialCapacity
)

Parameters

stylusPointDescription
Type: System.Windows.Input::StylusPointDescription^

A StylusPointDescription that specifies the additional properties stored in each StylusPoint.

initialCapacity
Type: System::Int32

The number of StylusPoint objects the StylusPointCollection can initially contain.

Exception Condition
ArgumentException

initialCapacity is negative.

ArgumentNullException

stylusPointDescription is null.

When you use the StylusPointCollection constructor to create a new StylusPointCollection, the StylusPointCollection is created with the capacity to hold the specified number of StylusPoint objects. You can add more StylusPoint objects than initialCapacity by calling the Add method.

The following example collects StylusPoint objects in the OnStylusDown method of a custom control. The example creates a StylusPointCollection by specifying the StylusPointDescription and the initial size of the StylusPointCollection.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0
Return to top
Show: