menu

Xamarin.Forms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ShapesCollection - Xamarin.Forms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ShapesCollection

    Collection of worksheet's shapes.

    Inheritance
    System.Object
    CollectionBase<IShape>
    CollectionBaseEx<IShape>
    ShapeCollectionBase
    ShapesCollection
    Implements
    System.Collections.Generic.IList<IShape>
    System.Collections.Generic.ICollection<IShape>
    System.Collections.Generic.IEnumerable<IShape>
    ICloneParent
    IShapes
    IParentApplication
    System.Collections.IEnumerable
    Inherited Members
    CollectionBase<IShape>.Add(IShape)
    CollectionBase<IShape>.Capacity
    CollectionBase<IShape>.Clear()
    CollectionBase<IShape>.Contains(IShape)
    CollectionBase<IShape>.CopyTo(IShape[], Int32)
    CollectionBase<IShape>.Count
    CollectionBase<IShape>.GetEnumerator()
    CollectionBase<IShape>.IndexOf(IShape)
    CollectionBase<IShape>.InnerList
    CollectionBase<IShape>.Insert(Int32, IShape)
    CollectionBase<IShape>.IsReadOnly
    CollectionBase<IShape>.List
    CollectionBase<IShape>.RemoveAt(Int32)
    CollectionBaseEx<IShape>.add_Cleared(CollectionBaseEx.CollectionClear<>)
    CollectionBaseEx<IShape>.add_Clearing(CollectionBaseEx.CollectionClear<>)
    CollectionBaseEx<IShape>.add_Inserted(CollectionBaseEx.CollectionChange<>)
    CollectionBaseEx<IShape>.add_Inserting(CollectionBaseEx.CollectionChange<>)
    CollectionBaseEx<IShape>.add_Removed(CollectionBaseEx.CollectionChange<>)
    CollectionBaseEx<IShape>.add_Removing(CollectionBaseEx.CollectionChange<>)
    CollectionBaseEx<IShape>.add_Set(CollectionBaseEx.CollectionSet<>)
    CollectionBaseEx<IShape>.add_Setting(CollectionBaseEx.CollectionSet<>)
    CollectionBaseEx<IShape>.AppImplementation
    CollectionBaseEx<IShape>.Application
    CollectionBaseEx<IShape>.Changed
    CollectionBaseEx<IShape>.ChangeName(IDictionary, ValueChangedEventArgs)
    CollectionBaseEx<IShape>.Cleared
    CollectionBaseEx<IShape>.Clearing
    CollectionBaseEx<IShape>.ClearMaxValues()
    CollectionBaseEx<IShape>.EnsureCapacity(Int32)
    CollectionBaseEx<IShape>.FindParent(Type)
    CollectionBaseEx<IShape>.FindParent(Type, Boolean)
    CollectionBaseEx<IShape>.GenerateDefaultName(ICollection<IShape>, String)
    CollectionBaseEx<IShape>.GenerateDefaultName(ICollection, String)
    CollectionBaseEx<IShape>.GenerateDefaultName(String, ICollection[])
    CollectionBaseEx<IShape>.Inserted
    CollectionBaseEx<IShape>.Inserting
    CollectionBaseEx<IShape>.OnClear()
    CollectionBaseEx<IShape>.OnClearComplete()
    CollectionBaseEx<IShape>.OnInsert(Int32, IShape)
    CollectionBaseEx<IShape>.OnInsertComplete(Int32, IShape)
    CollectionBaseEx<IShape>.OnRemove(Int32, IShape)
    CollectionBaseEx<IShape>.OnRemoveComplete(Int32, IShape)
    CollectionBaseEx<IShape>.OnSet(Int32, IShape, IShape)
    CollectionBaseEx<IShape>.OnSetComplete(Int32, IShape, IShape)
    CollectionBaseEx<IShape>.Parent
    CollectionBaseEx<IShape>.QuietMode
    CollectionBaseEx<IShape>.remove_Cleared(CollectionBaseEx.CollectionClear<>)
    CollectionBaseEx<IShape>.remove_Clearing(CollectionBaseEx.CollectionClear<>)
    CollectionBaseEx<IShape>.remove_Inserted(CollectionBaseEx.CollectionChange<>)
    CollectionBaseEx<IShape>.remove_Inserting(CollectionBaseEx.CollectionChange<>)
    CollectionBaseEx<IShape>.remove_Removed(CollectionBaseEx.CollectionChange<>)
    CollectionBaseEx<IShape>.remove_Removing(CollectionBaseEx.CollectionChange<>)
    CollectionBaseEx<IShape>.remove_Set(CollectionBaseEx.CollectionSet<>)
    CollectionBaseEx<IShape>.remove_Setting(CollectionBaseEx.CollectionSet<>)
    CollectionBaseEx<IShape>.Removed
    CollectionBaseEx<IShape>.Removing
    CollectionBaseEx<IShape>.Set
    CollectionBaseEx<IShape>.SetParent(Object)
    CollectionBaseEx<IShape>.Setting
    ShapeCollectionBase.AddChildShapes(MsofbtSpContainer, ExcelParseOptions)
    ShapeCollectionBase.AddCopy(IShape)
    ShapeCollectionBase.AddCopy(IShape, Dictionary<String, String>, List<Int32>)
    ShapeCollectionBase.AddCopy(ShapeImpl)
    ShapeCollectionBase.AddCopy(ShapeImpl, Dictionary<String, String>, Dictionary<Int32, Int32>)
    ShapeCollectionBase.AddGroupShape(MsofbtSpgrContainer, ExcelParseOptions)
    ShapeCollectionBase.AddShape(MsoBase, ExcelParseOptions)
    ShapeCollectionBase.AddShape(MsofbtSpContainer, ExcelParseOptions)
    ShapeCollectionBase.AddShape(ShapeImpl)
    ShapeCollectionBase.CreateData(Stream, MsofbtDgContainer, List<Int32>, List<List<BiffRecordRaw>>)
    ShapeCollectionBase.CreateGroupShape(MsofbtSpgrContainer, ExcelParseOptions)
    ShapeCollectionBase.DEF_ID_PER_GROUP
    ShapeCollectionBase.DEF_SHAPES_ROUND_VALUE
    ShapeCollectionBase.Item[Int32]
    ShapeCollectionBase.Item[String]
    ShapeCollectionBase.m_sheet
    ShapeCollectionBase.ParseMsoStructures(List<MsoBase>, ExcelParseOptions)
    ShapeCollectionBase.RegisterInWorksheet()
    ShapeCollectionBase.Remove(IShape)
    ShapeCollectionBase.Serialize(OffsetArrayList)
    ShapeCollectionBase.SetParents()
    ShapeCollectionBase.ShapesCount
    ShapeCollectionBase.ShapesTotalCount
    ShapeCollectionBase.Workbook
    ShapeCollectionBase.Worksheet
    ShapeCollectionBase.WorksheetBase
    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
    ShapeCollectionBase.RecordCode

    ShapeData

    Returns shared shape data for all shapes in this collection. Read-only.

    Declaration
    public override WorkbookShapeDataImpl ShapeData { get; }
    Property Value
    Type
    WorkbookShapeDataImpl
    Overrides
    ShapeCollectionBase.ShapeData

    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
    ShapeCollectionBase.Clone(Object)

    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
    ShapeCollectionBase.CreateShape(TObjType, MsofbtSpContainer, ExcelParseOptions, List<ObjSubRecord>, Int32)

    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
    ShapeCollectionBase.InitializeCollection()

    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.

    Implements

    System.Collections.Generic.IList<>
    System.Collections.Generic.ICollection<>
    System.Collections.Generic.IEnumerable<>
    ICloneParent
    IShapes
    IParentApplication
    System.Collections.IEnumerable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved