[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Drawing.IShapeRangeProvider.Item

this Property

this[string[]]

Returns a shape range (IShapeRange) object that represents a subset of the shapes in an IShapes collection.

Use this overload to create a shape range by specifying the names of the shapes to include.

Declaration
IShapeRange this[string[] index] { get; }
ReadOnly Default Property Item(index As String()) As IShapeRange
Parameters
Type Name Description
string[] index

The names of the shapes to include in the returned shape range.

Examples
IShapes shapes = worksheet.Shapes;
IShape rectangle = shapes.AddShape(AutoShapeType.Rectangle, 20, 20, 100, 60);
rectangle.Name = "Rectangle 1";
IShape oval = shapes.AddShape(AutoShapeType.Oval, 140, 20, 100, 60);
oval.Name = "Oval 1";
IShapeRange shapeRange = shapes.Range[new string[] {"Rectangle 1", "Oval 1"}];

this[int[]]

Returns a shape range (IShapeRange) object that represents a subset of the shapes in a shapes collection.

Use this overload to create a shape range by specifying the index numbers of the shapes to include.

Declaration
IShapeRange this[int[] index] { get; }
ReadOnly Default Property Item(index As Integer()) As IShapeRange
Parameters
Type Name Description
int[] index

The index numbers of the shapes to include in the returned shape range.

Examples
IShapes shapes = worksheet.Shapes;
shapes.AddShape(AutoShapeType.Rectangle, 20, 20, 100, 60);
shapes.AddShape(AutoShapeType.Oval, 140, 20, 100, 60);
IShapeRange shapeRange = shapes.Range[new int[] { 0, 1 }];