DrawingCollection Constructors

Definition

Initializes a new instance of the DrawingCollection class.

Overloads

DrawingCollection()

Initializes a new instance of the DrawingCollection class.

DrawingCollection(IEnumerable<Drawing>)

Initializes a new instance of the DrawingCollection class with the specified collection of Drawing objects.

DrawingCollection(Int32)

Initializes a new instance of DrawingCollection with the specified capacity.

DrawingCollection()

Initializes a new instance of the DrawingCollection class.

C#
public DrawingCollection();

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

DrawingCollection(IEnumerable<Drawing>)

Initializes a new instance of the DrawingCollection class with the specified collection of Drawing objects.

C#
public DrawingCollection(System.Collections.Generic.IEnumerable<System.Windows.Media.Drawing> collection);

Parameters

collection
IEnumerable<Drawing>

The collection of Drawing objects that make up the DrawingCollection.

Exceptions

collection is null.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

DrawingCollection(Int32)

Initializes a new instance of DrawingCollection with the specified capacity.

C#
public DrawingCollection(int capacity);

Parameters

capacity
Int32

The total capacity of the collection.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9