VisualCollection::Capacity Property

 

Gets or sets the number of elements that the VisualCollection can contain.

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

public:
property int Capacity {
	int get();
	void set(int value);
}

Property Value

Type: System::Int32

The number of elements that the VisualCollection can contain.

Exception Condition
ArgumentOutOfRangeException

Capacity is set to a value that is less than Count.

The value of Capacity is the number of elements that the VisualCollection is capable of storing. Count is the number of visuals that are actually in the VisualCollection. Capacity is always greater than or equal to Count. If Count exceeds Capacity while adding elements, the capacity of the VisualCollection is increased. By default Capacity is zero.

.NET Framework
Available since 3.0
Return to top
Show: