The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+
Row

ShapeCollection Interface

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

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v19.2.Core.dll

Declaration

public interface ShapeCollection :
    ISimpleCollection<Shape>,
    IEnumerable<Shape>,
    IEnumerable,
    ICollection
Public Interface ShapeCollection
    Inherits ISimpleCollection(Of Shape),
             IEnumerable(Of Shape),
             IEnumerable,
             ICollection
public interface ShapeCollection :
    ISimpleCollection<Shape>,
    IEnumerable<Shape>,
    IEnumerable,
    ICollection
Public Interface ShapeCollection
    Inherits ISimpleCollection(Of Shape),
             IEnumerable(Of Shape),
             IEnumerable,
             ICollection
public interface ShapeCollection :
    ISimpleCollection<Shape>,
    IEnumerable<Shape>,
    IEnumerable,
    ICollection
Public Interface ShapeCollection
    Inherits ISimpleCollection(Of Shape),
             IEnumerable(Of Shape),
             IEnumerable,
             ICollection

Remarks

The Worksheet.Shapes property returns a ShapeCollection object. This collection contains the standalone drawing objects and shape groups. It stores each group as a single shape and does not include individual elements that form this group. Use a group's Shape.GetChildren method to obtain its items. If you want to retrieve all drawing objects from a worksheet, including items of shape groups, use the Flatten() method.

The ShapeCollection.GetShapesByName method enables you to get all drawing objects with the specified name. To find a drawing object by its unique ID, use the ShapeCollection.GetShapeById method.

The table below lists the supported drawing object types and methods used to create them:

Drawing Object Method
Shape ShapeCollection.AddShape
Shape Group ShapeCollection.GroupShapes
Text Box ShapeCollection.AddTextBox
Shape Connector ShapeCollection.AddConnector
Picture PictureCollection.AddPicture
Chart ChartCollection.Add

Use the Shape.ShapeType property to determine a drawing object's type in the ShapeCollection collection.

See Also