StylusPointCollection Constructor (Int32)
Initializes a new instance of the StylusPointCollection class that may initially contain the specified number of StylusPoint objects.
Assembly: PresentationCore (in PresentationCore.dll)
Parameters
- initialCapacity
-
Type:
System::Int32
The number of StylusPoint objects the StylusPointCollection can initially contain.
| Exception | Condition |
|---|---|
| ArgumentException | initialCapacity is negative. |
When you use the StylusPointCollection constructor to create a new StylusPointCollection, you specify it's initialCapacity. However, you can add more StylusPoint objects 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 both the StylusPointDescription and the initial size of the StylusPointCollection.
Available since 3.0