menu

Xamarin.Android

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

    Show / Hide Table of Contents

    Class EntityCollection

    Represents a collection of DLS entities.

    Inheritance
    System.Object
    OwnerHolder
    CollectionImpl
    EntityCollection
    BodyItemCollection
    ParagraphItemCollection
    WCellCollection
    WRowCollection
    WSectionCollection
    WTextBoxCollection
    Implements
    IEntityCollectionBase
    ICollectionBase
    System.Collections.IEnumerable
    Inherited Members
    CollectionImpl.Count
    CollectionImpl.GetEnumerator()
    OwnerHolder.Document
    OwnerHolder.m_doc
    Namespace: Syncfusion.DocIO.DLS
    Assembly: Syncfusion.DocIO.Portable.dll
    Syntax
    public abstract class EntityCollection : CollectionImpl, IEntityCollectionBase, ICollectionBase, IEnumerable

    Properties

    FirstItem

    Gets the first item from the collection.

    Declaration
    public Entity FirstItem { get; }
    Property Value
    Type Description
    Entity

    The Entity at the first index.

    Item[Int32]

    Gets the Entity at the specified index.

    Declaration
    public Entity this[int index] { get; }
    Parameters
    Type Name Description
    System.Int32 index

    The zero-based index of the entity to get.

    Property Value
    Type Description
    Entity

    The Entity at the specified index.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    The index is not valid index in the IEntityCollectionBase.

    LastItem

    Gets the last item from the collection.

    Declaration
    public Entity LastItem { get; }
    Property Value
    Type Description
    Entity

    The Entity at the last index.

    TypesOfElement

    Gets the type of the elements present in the collection.

    Declaration
    protected abstract Type[] TypesOfElement { get; }
    Property Value
    Type Description
    System.Type[]

    The System.Type collection that contains the types of the elements.

    Methods

    Add(IEntity)

    Adds the specified entity to the collection.

    Declaration
    public int Add(IEntity entity)
    Parameters
    Type Name Description
    IEntity entity

    The Entity to be added to the collection.

    Returns
    Type Description
    System.Int32

    The zero-based index of the Entity.

    Exceptions
    Type Condition
    System.InvalidOperationException

    Thrown when paragraph is added to CheckBox and Picture content control.

    Clear()

    Removes all items from the collection.

    Declaration
    public void Clear()

    Contains(IEntity)

    Determines whether an entity is in the collection.

    Declaration
    public bool Contains(IEntity entity)
    Parameters
    Type Name Description
    IEntity entity

    The Entity to be found in the collection.

    Returns
    Type Description
    System.Boolean

    True if it contains the specified entity, otherwise false.

    IndexOf(IEntity)

    Returns the zero-based index of the specified entity.

    Declaration
    public int IndexOf(IEntity entity)
    Parameters
    Type Name Description
    IEntity entity

    The Entity to which the index to be found.

    Returns
    Type Description
    System.Int32

    The zero-based index of the specified entity.

    Insert(Int32, IEntity)

    Inserts a entity into the collection at the specified index.

    Declaration
    public void Insert(int index, IEntity entity)
    Parameters
    Type Name Description
    System.Int32 index

    The integer that specifies the index to insert the entity.

    IEntity entity

    The Entity to be inserted.

    OnClear()

    Occurs when all items are removed.

    Declaration
    protected virtual void OnClear()

    OnInsert(Int32, Entity)

    Occurs when entity is inserted.

    Declaration
    protected virtual void OnInsert(int index, Entity entity)
    Parameters
    Type Name Description
    System.Int32 index

    The zero-based index to insert the entity.

    Entity entity

    The Entity to insert.

    OnInsertComplete(Int32, Entity)

    Occurs when entity is inserted.

    Declaration
    protected virtual void OnInsertComplete(int index, Entity entity)
    Parameters
    Type Name Description
    System.Int32 index

    The zero-based index to insert the entity.

    Entity entity

    The Entity to insert.

    OnRemove(Int32)

    occurs when entity is removed.

    Declaration
    protected virtual void OnRemove(int index)
    Parameters
    Type Name Description
    System.Int32 index

    The zero-based index to remove the entity.

    Remove(IEntity)

    Removes the entity from the collection.

    Declaration
    public void Remove(IEntity entity)
    Parameters
    Type Name Description
    IEntity entity

    The Entity to be removed.

    RemoveAt(Int32)

    Removes the entity at the specified index from the collection.

    Declaration
    public void RemoveAt(int index)
    Parameters
    Type Name Description
    System.Int32 index

    The index of the entity to be removed.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    The index is not valid in the EntityCollection.

    Implements

    IEntityCollectionBase
    ICollectionBase
    System.Collections.IEnumerable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved