Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+
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.
AddPicture(SpreadsheetImageSource, Cell) Obsolete. Inserts a picture from the SpreadsheetImageSource object so that the top left corner of the picture is located at the specified cell.
AddPicture(SpreadsheetImageSource, Range, Boolean) Obsolete. Inserts a picture from the SpreadsheetImageSource object to fit in the specified range allowing you to lock the aspect ratio.
AddPicture(SpreadsheetImageSource, Range) Obsolete. Inserts a picture from the SpreadsheetImageSource object to fit in the specified range.
AddPicture(SpreadsheetImageSource, Single, Single, Single, Single, Boolean) Obsolete. Inserts a picture from the SpreadsheetImageSource object at the specified location and resize it to the specified dimensions allowing you to lock the aspect ratio.
AddPicture(SpreadsheetImageSource, Single, Single, Single, Single) Obsolete. Inserts a picture from the SpreadsheetImageSource object at the specified location and resize it to the specified dimensions.
AddPicture(SpreadsheetImageSource, Single, Single) Obsolete. Inserts a picture from the SpreadsheetImageSource object at the specified location.
AddPicture(Image, Cell) Obsolete. Inserts a picture from the Image object so that the top left corner of the picture is located at the specified cell.
AddPicture(Image, Range, Boolean) Obsolete. Inserts an image to fit in the specified range allowing you to lock the aspect ratio.
AddPicture(Image, Range) Obsolete. Inserts an image to fit in the specified range.
AddPicture(Image, Single, Single, Single, Single, Boolean) Obsolete. Inserts a picture from the Image object at the specified location and resizes it to the specified dimensions allowing you to lock the aspect ratio.
AddPicture(Image, Single, Single, Single, Single) Obsolete. Inserts an image at the specified location and resize it to the specified dimensions.
AddPicture(Image, Single, Single) Obsolete. Inserts a picture from the Image object at the specified location.
AddPicture(String, Cell) Obsolete. Inserts a picture from a file so that the top left corner of the picture is located at the specified cell.
AddPicture(String, Range, Boolean) Obsolete. Inserts a picture from a file to fit in the specified range allowing you to lock the aspect ratio.
AddPicture(String, Range) Obsolete. Inserts a picture from a file to fit in the specified range.
AddPicture(String, Single, Single, Single, Single, Boolean) Obsolete. Inserts a picture from a file at the specified location and resizes it to the specified dimensions allowing you to lock the aspect ratio.
AddPicture(String, Single, Single, Single, Single) Obsolete. Inserts a picture from a file at the specified location and resizes it to the specified dimensions.
AddPicture(String, Single, Single) Obsolete. Inserts a picture from a file at the specified location.
AddShape(ShapeGeometryPreset, Cell, Single, Single) Inserts a shape so that its top left corner is located at the specified cell.
AddShape(ShapeGeometryPreset, Range) 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(Range, 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