Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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:
© 2017 Microsoft