GemBox.Spreadsheet
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    ExcelDrawingCollection<T> Class

    Namespace:
    GemBox.Spreadsheet
    Assembly:
    GemBox.Spreadsheet.dll

    Represents a collection of ExcelDrawing (pictures, charts, etc.) in the worksheet.

    • C#
    • VB.NET
    public abstract class ExcelDrawingCollection<T> : IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable
    Public MustInherit Class ExcelDrawingCollection(Of T As ExcelDrawing)
        Implements IList(Of T), ICollection(Of T), IEnumerable(Of T), IEnumerable
    Type Parameters
    T

    An ExcelDrawing derived type.

    Inheritance:
    System.Object
    ExcelDrawingCollection<T>
    Derived
    ExcelChartCollection
    ExcelFormControlCollection
    ExcelEmbeddedObjectCollection
    ExcelGroupShapeCollection
    ExcelPictureCollection
    ExcelShapeCollection
    Implements
    System.Collections.Generic.IList<T>
    System.Collections.Generic.ICollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable

    Properties

    Count

    Gets the number of elements contained in the ExcelDrawingCollection<T>.

    • C#
    • VB.NET
    public int Count { get; }
    Public ReadOnly Property Count As Integer
    Property Value
    System.Int32

    Item[Int32]

    Gets the element at the specified index.

    • C#
    • VB.NET
    public T this[int index] { get; }
    Public ReadOnly Property Item(index As Integer) As T
    Parameters
    index
    System.Int32

    The zero-based index of the element to get.

    Property Value
    T

    The element at the specified index.

    Methods

    AddCopy(T)

    Adds a copy of the drawing (picture, chart, etc.) to the worksheet.

    • C#
    • VB.NET
    public T AddCopy(T item)
    Public Function AddCopy(item As T) As T
    Parameters
    item
    T

    The drawing (picture, chart, etc.) which will be copied to the worksheet.

    Returns
    T

    A copy of the drawing (picture, chart, etc.) added to the worksheet.

    BringForward(T)

    Moves the specified item one position forward in the drawings.

    • C#
    • VB.NET
    public void BringForward(T item)
    Public Sub BringForward(item As T)
    Parameters
    item
    T

    The item to move forward.

    Remarks

    The index of the item will not be updated if the item in front is a different type. But it will still update the position.

    BringForward(Int32)

    Moves the item at the specified index one position forward in the drawings.

    • C#
    • VB.NET
    public void BringForward(int index)
    Public Sub BringForward(index As Integer)
    Parameters
    index
    System.Int32

    The index of the item to move forward.

    Remarks

    The index of the item will not be updated if the item in front is a different type. But it will still update the position.

    BringToFront(T)

    Brings the specified item to the front of the drawings.

    • C#
    • VB.NET
    public void BringToFront(T item)
    Public Sub BringToFront(item As T)
    Parameters
    item
    T

    The item to bring to the front.

    BringToFront(Int32)

    Brings the item at the specified index to the front of the drawings.

    • C#
    • VB.NET
    public void BringToFront(int index)
    Public Sub BringToFront(index As Integer)
    Parameters
    index
    System.Int32

    The index of the item to bring to the front.

    Clear()

    Removes all elements from the ExcelDrawingCollection<T>.

    • C#
    • VB.NET
    public void Clear()
    Public Sub Clear

    Contains(T)

    Determines whether an element is in the ExcelDrawingCollection<T>.

    • C#
    • VB.NET
    public bool Contains(T item)
    Public Function Contains(item As T) As Boolean
    Parameters
    item
    T

    The object to locate in the ExcelDrawingCollection<T>.

    Returns
    System.Boolean

    true if item is found; otherwise, false.

    GetEnumerator()

    Returns an enumerator that iterates through the ExcelDrawingCollection<T>

    • C#
    • VB.NET
    public IEnumerator<T> GetEnumerator()
    Public Function GetEnumerator As IEnumerator(Of T)
    Returns
    System.Collections.Generic.IEnumerator<T>

    An enumerator for the ExcelDrawingCollection<T>.

    IndexOf(T)

    Searches for the specified object and returns the zero-based index of the first occurrence within the entire ExcelDrawingCollection<T>.

    • C#
    • VB.NET
    public int IndexOf(T item)
    Public Function IndexOf(item As T) As Integer
    Parameters
    item
    T

    The object to locate in the ExcelDrawingCollection<T>.

    Returns
    System.Int32

    The zero-based index of the first occurrence of item within the entire ExcelDrawingCollection<T>, if found; otherwise, -1.

    Move(Int32, Int32)

    Moves the ExcelDrawing at the specified index to a new location in the collection thus affecting its Z-index.

    Drawings at the lower location in the collection have a lower Z-index and are drawn before drawings at the higher location in the collection.

    • C#
    • VB.NET
    public void Move(int oldIndex, int newIndex)
    Public Sub Move(oldIndex As Integer, newIndex As Integer)
    Parameters
    oldIndex
    System.Int32

    The zero-based index specifying the location of the ExcelDrawing to be moved.

    newIndex
    System.Int32

    The zero-based index specifying the new location of the ExcelDrawing.

    MoveZIndex(T, Int32)

    Moves the item forward or backward in the drawings with the given relative index.

    • C#
    • VB.NET
    public void MoveZIndex(T item, int relativeIndex)
    Public Sub MoveZIndex(item As T, relativeIndex As Integer)
    Parameters
    item
    T

    The item to move backward or forward.

    relativeIndex
    System.Int32

    The relative index for the item to update. Negative to move backward and positive to move forward.

    Remove(T)

    Removes the first occurrence of a specific object from the ExcelDrawingCollection<T>.

    • C#
    • VB.NET
    public bool Remove(T item)
    Public Function Remove(item As T) As Boolean
    Parameters
    item
    T

    The object to remove from the ExcelDrawingCollection<T>.

    Returns
    System.Boolean

    true if item is successfully removed; otherwise, false.

    RemoveAt(Int32)

    Removes the element at the specified index of the ExcelDrawingCollection<T>.

    • C#
    • VB.NET
    public void RemoveAt(int index)
    Public Sub RemoveAt(index As Integer)
    Parameters
    index
    System.Int32

    The zero-based index of the element to remove.

    SendBackward(T)

    Moves the specified item one position backward in the drawings.

    • C#
    • VB.NET
    public void SendBackward(T item)
    Public Sub SendBackward(item As T)
    Parameters
    item
    T

    The item to move backward.

    Remarks

    The index of the item will not be updated if the item behind is a different type. But it will still update the position.

    SendBackward(Int32)

    Moves the item at the specified index one position backward in the drawings.

    • C#
    • VB.NET
    public void SendBackward(int index)
    Public Sub SendBackward(index As Integer)
    Parameters
    index
    System.Int32

    The index of the item to move backward.

    Remarks

    The index of the item will not be updated if the item behind is a different type. But it will still update the position.

    SendToBack(T)

    Sends the specified item to the back of the drawings.

    • C#
    • VB.NET
    public void SendToBack(T item)
    Public Sub SendToBack(item As T)
    Parameters
    item
    T

    The item to send to the back.

    SendToBack(Int32)

    Sends the item at the specified index to the back of the drawings.

    • C#
    • VB.NET
    public void SendToBack(int index)
    Public Sub SendToBack(index As Integer)
    Parameters
    index
    System.Int32

    The index of the item to send to the back.

    Implements

    System.Collections.Generic.IList<T>
    System.Collections.Generic.ICollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable

    See Also

    Pictures
    Charts
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.