Skip to main content
Row

ShapeCollection Members

A collection of drawing objects (shapes, pictures, and charts).

Properties

Name Description
Count Gets the number of elements contained in the ICollection. Inherited from ICollection.
IsSynchronized Gets a value indicating whether access to the ICollection is synchronized (thread safe). Inherited from ICollection.
SyncRoot Gets an object that can be used to synchronize access to the ICollection. Inherited from ICollection.

Methods

Name Description
AddConnector(ConnectorType, Single, Single, Single, Single) Creates an unbound shape connector.
AddShape(ShapeGeometryPreset, Cell, Single, Single) Inserts a shape so that its top left corner is located at the specified cell.
AddShape(ShapeGeometryPreset, CellRange) Inserts a shape to fit in the specified range.
AddShape(ShapeGeometryPreset, Single, Single, Single, Single) Inserts a shape with a specific geometry type.
AddTextBox(Cell, Single, Single, String) Inserts a text box so that its top left corner is located at the specified cell.
AddTextBox(CellRange, String) Inserts a text box to fit in the specified range.
AddTextBox(Single, Single, Single, Single, String) Inserts a text box.
Clear() Removes all objects from the ShapeCollection instance.
Contains(String) Determines whether the collection contains the specified item.
CopyTo(Array, Int32) Copies the elements of the ICollection to an Array, starting at a particular Array index. Inherited from ICollection.
Flatten() Converts a shape collection into a flattened collection that contains all drawing objects in a worksheet, including items of shape groups.
GetEnumerator() Returns an enumerator that iterates through the collection. Inherited from IEnumerable<T>.
GetShapeById(Int32) Gets a drawing object by its ID value.
GetShapesByName(String) Gets a drawing object(s) by name.
GroupShapes(IList<Shape>) Groups shapes into a shape group.
NormalizeZOrder() Recalculates z-order values for drawing objects, so that they are consecutive integers.
RemoveAt(Int32) Removes an element at the specified index from the ShapeCollection collection.
UngroupShapes(Shape) Splits a shape group into individual shapes.
See Also