Class GroupShape
Represents a group shape containing multiple shapes in a spreadsheet.
Inherited Members
Namespace: DRIT.Spreadsheet.Drawing
Assembly: DRIT.Spreadsheet.dll
Syntax
public class GroupShape : AbstractShape, IWorksheetDrawingObject, ISheetDrawingObject, IDrawingObject, IGroupShape
Constructors
GroupShape()
Initializes a new instance of the GroupShape class.
Declaration
public GroupShape()
Properties
GroupShapes
Gets the nested group shapes within this group.
Declaration
public IEnumerable<IGroupShape> GroupShapes { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<IGroupShape> |
Shapes
Gets the collection of shapes in the group.
Declaration
public ShapeCollection Shapes { get; }
Property Value
| Type | Description |
|---|---|
| ShapeCollection |
Methods
AddConnector(Position, Size, string)
Adds a connector to the group at the specified position and size.
Declaration
public ConnectorShape AddConnector(Position position, Size size, string name = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Position | position | The position relative to the group. |
| Size | size | The size of the connector. |
| string | name | The optional connector name. |
Returns
| Type | Description |
|---|---|
| ConnectorShape | The newly added connector. |
AddGroup(Position, Size, string)
Adds a nested group to this group at the specified position and size.
Declaration
public GroupShape AddGroup(Position position, Size size, string name = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Position | position | The position relative to the parent group. |
| Size | size | The size of the nested group. |
| string | name | The optional group name. |
Returns
| Type | Description |
|---|---|
| GroupShape | The newly added nested group. |
AddPicture(Position, Size, string)
Adds a picture placeholder to the group at the specified position and size.
Declaration
public PictureShape AddPicture(Position position, Size size, string name = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Position | position | The position relative to the group. |
| Size | size | The size of the picture. |
| string | name | The optional picture name. |
Returns
| Type | Description |
|---|---|
| PictureShape | The newly added picture shape. |
Remarks
Use the worksheet picture APIs to register image bytes in the workbook media cache. Spreadsheet grouped pictures do not expose SVG or image extraction APIs.
AddShape(ShapeType, Position, Size, string)
Adds a shape to the group at the specified position and size.
Declaration
public Shape AddShape(ShapeType shapeType, Position position, Size size, string name = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ShapeType | shapeType | The type of shape to create. |
| Position | position | The position relative to the group. |
| Size | size | The size of the shape. |
| string | name | The optional shape name. |
Returns
| Type | Description |
|---|---|
| Shape | The newly added shape. |