[]
Specifies the general category of a drawing object.
Use this enumeration with Type to determine whether a shape represents an AutoShape, chart, comment, picture, group, or another supported drawing object type.
public enum ShapeType
Public Enum ShapeType
IShape shape = worksheet.Shapes.AddShape(AutoShapeType.Rectangle, 20, 20, 100, 60);
ShapeType type = shape.Type;
if (type == ShapeType.AutoShape)
{
shape.Fill.Color.RGB = Color.Blue;
}
| Name | Description |
|---|---|
| AutoShape | Specifies the AutoShape type for a shape that is treated as a standard preset shape or connector rather than a chart, picture, comment, group, line, freeform, text box, or other specialized shape type. |
| Callout | Specifies the Callout type for a shape that displays text or annotations with a pointer to related content. |
| Chart | Specifies the Chart type. |
| Comment | Specifies the shape type for a traditional cell comment represented by IComment, not a threaded comment. |
| CommentThreaded | Specifies the shape type for a threaded cell comment represented by ICommentThreaded. |
| FormControl | Specifies a form control shape that represents a IControl object on a worksheet. |
| FreeForm | Specifies the FreeForm type for a shape defined by custom freeform geometry rather than a preset AutoShape, text box, graphic, or line. |
| Graphic | Specifies the Vector Graphic type. Use this value when the shape represents a vector graphic, such as an SVG image, rather than a raster picture or a line shape. |
| Group | Specifies a group shape. This value indicates that the shape is a grouped object that contains multiple shapes and behaves as a single shape for operations such as moving, resizing, formatting, or ungrouping. |
| Line | Specifies a line shape. |
| Picture | Specifies the Picture type for a shape that represents an inserted image or picture object. |
| Slicer | Specifies the Slicer type. Use this value when the shape represents a slicer object in the worksheet drawing layer, such as a slicer associated with a table or PivotTable. |
| TextBox | Specifies the Text Box type. |