Skip to main content
All docs
V19.1
.NET Framework 4.5.2+
Row

ShapeCollection.AddShape(ShapeGeometryPreset, Range) Method

Inserts a shape to fit in the specified range.

Namespace: DevExpress.Spreadsheet

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

Declaration

Shape AddShape(
    ShapeGeometryPreset shapePreset,
    Range targetRange
)

Parameters

Name Type Description
shapePreset ShapeGeometryPreset

An enumeration member that specifies the shape’s geometry.

targetRange Range

A cell range to which the inserted shape should fit.

Returns

Type Description
Shape

The resulting shape.

Remarks

Use the Shape.ShapeType property to determine a drawing object’s type in a ShapeCollection. The ShapeGeometry.Preset property returns a shape’s geometry type.

The Shape.Fill and ShapeFormatBase.Outline properties allow you to change a shape’s fill and outline settings.

Use the ShapeCollection.RemoveAt or Shape.Delete method to delete a shape.

See Also