IShapeCollection
Overview
IShapeCollection is a interface in Aspose.Slides FOSS for .NET.
Inherits from: IEnumerable<IShape>.
Represents an ordered, mutable collection of IShape objects belonging to a slide or group shape.
This interface provides 20 methods for working with IShapeCollection objects in .NET programs.
Available methods include: AddAutoShape, AddConnector, AddPictureFrame, AddTable, Clear, IndexOf, InsertAutoShape, InsertConnector, InsertPictureFrame, InsertTable, Remove, RemoveAt, and 2 additional methods.
All public members are accessible to any .NET application after installing the Aspose.Slides FOSS for .NET package.
Properties: AsICollection, AsIEnumerable, Count, ParentGroup.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
ParentGroup | IGroupShape? | Read | Gets the parent group shape that owns this collection. |
AsICollection | IList<IShape> | Read | Exposes the collection as a generic list interface. |
AsIEnumerable | IEnumerable<IShape> | Read | Exposes the collection as an enumerable interface. |
Count | int | Read | Gets the number of shapes in the collection. |
Methods
| Signature | Description |
|---|---|
ToArray() | Returns all shapes in the collection as a new array. |
ToArray(startIndex: int, count: int) | Returns a subset of shapes starting at the specified index. |
Reorder(index: int, shape: IShape) | Moves a single shape to the specified position in the collection, changing its z-order. |
Reorder(index: int, shapes: IShape[]) | Moves multiple shapes so that they start at the specified position, preserving their relative order. |
AddAutoShape(shapeType: ShapeType, x: float, y: float, width: float, height: float) | Creates a new auto shape and appends it to the collection. |
AddAutoShape(shapeType: ShapeType, x: float, y: float, width: float, height: float, createFromTemplate: bool) | Creates a new auto shape and appends it to the collection. |
InsertAutoShape(index: int, shapeType: ShapeType, x: float, y: float, width: float, height: float) | Creates a new auto shape and inserts it at the specified position. |
InsertAutoShape(index: int, shapeType: ShapeType, x: float, y: float, width: float, height: float, createFromTemplate: bool) | Creates a new auto shape and inserts it at the specified position. |
AddConnector(shapeType: ShapeType, x: float, y: float, width: float, height: float) | Creates a connector shape and appends it to the collection. |
AddConnector(shapeType: ShapeType, x: float, y: float, width: float, height: float, createFromTemplate: bool) | Creates a connector shape and appends it to the collection. |
InsertConnector(index: int, shapeType: ShapeType, x: float, y: float, width: float, height: float) | Creates a connector shape and inserts it at the specified position. |
InsertConnector(index: int, shapeType: ShapeType, x: float, y: float, width: float, height: float, createFromTemplate: bool) | Creates a connector shape and inserts it at the specified position. |
AddPictureFrame(shapeType: ShapeType, x: float, y: float, width: float, height: float, image: IPPImage) | Creates a picture frame and appends it to the collection. |
InsertPictureFrame(index: int, shapeType: ShapeType, x: float, y: float, width: float, height: float, image: IPPImage) | Creates a picture frame and inserts it at the specified position. |
AddTable(x: float, y: float, columnWidths: double[], rowHeights: double[]) | Creates a table and appends it to the collection. |
InsertTable(index: int, x: float, y: float, columnWidths: double[], rowHeights: double[]) | Creates a table and inserts it at the specified position. |
IndexOf(shape: IShape) | Returns the zero-based index of the specified shape, or -1 if not found. |
RemoveAt(index: int) | Removes the shape at the specified zero-based index. |
Remove(shape: IShape) | Removes the first occurrence of the specified shape from the collection. |
Clear() | Removes all shapes from the collection. |