Class ShapesCollection
Collection of worksheet's shapes.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.XlsIO.Implementation.Collections
Assembly: Syncfusion.XlsIO.Portable.dll
Syntax
public class ShapesCollection : ShapeCollectionBase, IList<IShape>, ICollection<IShape>, IEnumerable<IShape>, ICloneParent, IShapes, IParentApplication, IEnumerable
Constructors
ShapesCollection(IApplication, Object)
Declaration
public ShapesCollection(IApplication application, object parent)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | |
System.Object | parent |
ShapesCollection(IApplication, Object, MsofbtSpgrContainer, ExcelParseOptions)
Declaration
public ShapesCollection(IApplication application, object parent, MsofbtSpgrContainer container, ExcelParseOptions options)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | |
System.Object | parent | |
MsofbtSpgrContainer | container | |
ExcelParseOptions | options | Parse options. |
Fields
DefaultChartNameStart
Default start of the chart shape name.
Declaration
public const string DefaultChartNameStart = "Chart "
Field Value
Type |
---|
System.String |
DefaultCheckBoxNameStart
Default start of the checkbox shape name.
Declaration
public const string DefaultCheckBoxNameStart = "CheckBox "
Field Value
Type |
---|
System.String |
DefaultComboBoxNameStart
Default start of the combobox shape name.
Declaration
public const string DefaultComboBoxNameStart = "Drop Down "
Field Value
Type |
---|
System.String |
DefaultOptionButtonNameStart
Declaration
public const string DefaultOptionButtonNameStart = "Option Button "
Field Value
Type |
---|
System.String |
DefaultPictureNameStart
Default start of the picture shape name.
Declaration
public const string DefaultPictureNameStart = "Picture "
Field Value
Type |
---|
System.String |
DefaultTextBoxNameStart
Default start of the textbox shape name.
Declaration
public const string DefaultTextBoxNameStart = "TextBox "
Field Value
Type |
---|
System.String |
Properties
Comments
Returns collection of all comments in the worksheet. Read-only.
Declaration
public IComments Comments { get; }
Property Value
Type |
---|
IComments |
InnerComments
Returns collection of all comments in the worksheet. Read-only.
Declaration
public CommentsCollection InnerComments { get; }
Property Value
Type |
---|
CommentsCollection |
RecordCode
Code of the Biff record in which all data is stored. Read-only.
Declaration
public override TBIFFRecord RecordCode { get; }
Property Value
Type |
---|
TBIFFRecord |
Overrides
ShapeData
Returns shared shape data for all shapes in this collection. Read-only.
Declaration
public override WorkbookShapeDataImpl ShapeData { get; }
Property Value
Type |
---|
WorkbookShapeDataImpl |
Overrides
Methods
AddAutoShapes(AutoShapeType, Int32, Int32, Int32, Int32)
Add AutoShapes into collection
Declaration
public IShape AddAutoShapes(AutoShapeType autoShapeType, int topRow, int leftColumn, int height, int width)
Parameters
Type | Name | Description |
---|---|---|
AutoShapeType | autoShapeType | AutoShapeType |
System.Int32 | topRow | TopRow |
System.Int32 | leftColumn | LeftColumn |
System.Int32 | height | Height |
System.Int32 | width | Width |
Returns
Type |
---|
IShape |
AddChart()
Adds new chart shape to the collection.
Declaration
public IChartShape AddChart()
Returns
Type | Description |
---|---|
IChartShape | Newly added shape. |
AddCheckBox()
Adds new checkbox shape to the collection.
Declaration
public ICheckBoxShape AddCheckBox()
Returns
Type | Description |
---|---|
ICheckBoxShape | Newly added shape. |
AddComboBox()
Adds new checkbox shape to the collection.
Declaration
public IComboBoxShape AddComboBox()
Returns
Type | Description |
---|---|
IComboBoxShape | Newly added shape. |
AddComment()
Adds comment with empty text to the collection.
Declaration
public ICommentShape AddComment()
Returns
Type | Description |
---|---|
ICommentShape | Added comment. |
AddComment(String)
Adds new Comment shape to the collection.
Declaration
public ICommentShape AddComment(string commentText)
Parameters
Type | Name | Description |
---|---|---|
System.String | commentText | Text of the comment. |
Returns
Type | Description |
---|---|
ICommentShape | Newly added shape. |
AddComment(String, Boolean)
Adds new Comment shape to the collection.
Declaration
public ICommentShape AddComment(string commentText, bool bIsParseOptions)
Parameters
Type | Name | Description |
---|---|---|
System.String | commentText | Text of the comment. |
System.Boolean | bIsParseOptions | Indicates is parse comment fill line options. |
Returns
Type | Description |
---|---|
ICommentShape | Newly added shape. |
AddFormControlShape()
Adds FormControlShape into collection.
Declaration
public FormControlShapeImpl AddFormControlShape()
Returns
Type | Description |
---|---|
FormControlShapeImpl | Newly created shape. |
AddOptionButton()
Adds new OptionButton shape to the collection.
Declaration
public IOptionButtonShape AddOptionButton()
Returns
Type | Description |
---|---|
IOptionButtonShape | Newly added shape. |
AddPicture(Image, String, ExcelImageFormat)
Adds picture.
Declaration
public IPictureShape AddPicture(Image image, string pictureName, ExcelImageFormat imageFormat)
Parameters
Type | Name | Description |
---|---|---|
Image | image | Image to adding. |
System.String | pictureName | Name of picture. |
ExcelImageFormat | imageFormat | Image format. |
Returns
Type | Description |
---|---|
IPictureShape | Returns IPicture object that include picture. |
AddPicture(BitmapShapeImpl)
Adds picture to collections.
Declaration
public void AddPicture(BitmapShapeImpl shape)
Parameters
Type | Name | Description |
---|---|---|
BitmapShapeImpl | shape | Represents picture to add. |
AddPicture(Int32, String)
Adds picture to the collection by blipId.
Declaration
public BitmapShapeImpl AddPicture(int iBlipId, string strPictureName)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iBlipId | Picture id. |
System.String | strPictureName | Picture name. |
Returns
Type | Description |
---|---|
BitmapShapeImpl | Newly created picture object. |
AddTextBox()
Adds new textbox shape to the collection.
Declaration
public ITextBoxShapeEx AddTextBox()
Returns
Type | Description |
---|---|
ITextBoxShapeEx | Newly added shape. |
CanInsertRowColumn(Int32, Int32, Boolean, Int32)
Checks whether it is possible insert row or column into iIndex.
Declaration
public bool CanInsertRowColumn(int iIndex, int iCount, bool bRow, int iMaxIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iIndex | Index of row to insert. |
System.Int32 | iCount | Number of rows to insert. |
System.Boolean | bRow | Indicates whether rows are inserted. |
System.Int32 | iMaxIndex | Maximum possible index. |
Returns
Type | Description |
---|---|
System.Boolean | True if it is possible to insert row or column. |
Clone(Object)
Creates copy of the collection.
Declaration
public override object Clone(object parent)
Parameters
Type | Name | Description |
---|---|---|
System.Object | parent | Parent object for the new collection. |
Returns
Type | Description |
---|---|
System.Object | Copy of the collection. |
Overrides
CopyMoveShapeOnRangeCopy(WorksheetImpl, Rectangle, Rectangle, Boolean)
Copies or moves shape on range copy / move.
Declaration
public void CopyMoveShapeOnRangeCopy(WorksheetImpl destSheet, Rectangle rec, Rectangle recDest, bool bIsCopy)
Parameters
Type | Name | Description |
---|---|---|
WorksheetImpl | destSheet | Represents destination sheet for shape. |
Rectangle | rec | Represents range dimension. |
Rectangle | recDest | Represents destination rectangle |
System.Boolean | bIsCopy | Indicates is copy or move. |
CreateShape(TObjType, MsofbtSpContainer, ExcelParseOptions, List<ObjSubRecord>, Int32)
Creates new shape to object to this collection.
Declaration
protected override ShapeImpl CreateShape(TObjType objType, MsofbtSpContainer shapeContainer, ExcelParseOptions options, List<ObjSubRecord> subRecords, int cmoIndex)
Parameters
Type | Name | Description |
---|---|---|
TObjType | objType | Object type to create. |
MsofbtSpContainer | shapeContainer | Shape container. |
ExcelParseOptions | options | Parse options. |
System.Collections.Generic.List<ObjSubRecord> | subRecords | Subrecords of the shape's OBJRecord. |
System.Int32 | cmoIndex | Index to the cmo record inside subrecords. |
Returns
Type | Description |
---|---|
ShapeImpl | Created shape. |
Overrides
GetShapeById(Int32)
Gets shape by its id.
Declaration
public IShape GetShapeById(int id)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id | Shape's id to locate. |
Returns
Type |
---|
IShape |
Group(IShape[])
Create a group shape for selected items.
Declaration
public IGroupShape Group(IShape[] groupItems)
Parameters
Type | Name | Description |
---|---|---|
IShape[] | groupItems | AutoShapeType |
Returns
Type | Description |
---|---|
IGroupShape | Newly created group shape |
InitializeCollection()
Initializes collection
Declaration
protected override void InitializeCollection()
Overrides
InnerRemoveComment(ICommentShape)
Removes comment from internal collections.
Declaration
public void InnerRemoveComment(ICommentShape comment)
Parameters
Type | Name | Description |
---|---|---|
ICommentShape | comment |
InsertRemoveRowColumn(Int32, Int32, Boolean, Boolean)
Updates shapes position on insert or remove row in worksheet.
Declaration
public void InsertRemoveRowColumn(int iIndex, int iCount, bool bRow, bool bRemove)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iIndex | Represents row \ column index. |
System.Int32 | iCount | Represents count. |
System.Boolean | bRow | Indicates is row. |
System.Boolean | bRemove | Indicates is remove or insert. |
RegenerateComboBoxNames()
Regenerates combo box names
Declaration
public void RegenerateComboBoxNames()
SetVersion(ExcelVersion)
Removes all shapes that are out of new dimensions.
Declaration
public void SetVersion(ExcelVersion version)
Parameters
Type | Name | Description |
---|---|---|
ExcelVersion | version | Version to set. |
Ungroup(IGroupShape)
Ungroup the specified group shape.
Declaration
public void Ungroup(IGroupShape groupShape)
Parameters
Type | Name | Description |
---|---|---|
IGroupShape | groupShape | Group shape to ungroup. |
Ungroup(IGroupShape, Boolean)
Ungroup the group shape and its inner shapes.
Declaration
public void Ungroup(IGroupShape groupShape, bool isAll)
Parameters
Type | Name | Description |
---|---|---|
IGroupShape | groupShape | Group shape to ungroup. |
System.Boolean | isAll | Boolean value which indicates whether the inner shapes will be ungrouped. |
UpdateFormula(Int32, Int32, Rectangle, Int32, Rectangle)
Updates formulas after copy operation.
Declaration
public void UpdateFormula(int iCurIndex, int iSourceIndex, Rectangle sourceRect, int iDestIndex, Rectangle destRect)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iCurIndex | Current worksheet index. |
System.Int32 | iSourceIndex | Source worksheet index. |
Rectangle | sourceRect | Source rectangle. |
System.Int32 | iDestIndex | Destination worksheet index. |
Rectangle | destRect | Destination rectangle. |