ExcelDrawingCollection<T> Class
Represents a collection of ExcelDrawing (pictures, charts, etc.) in the worksheet.
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.ObjectExcelDrawingCollection<T>
- Derived
Implements
Properties
Count
Gets the number of elements contained in the ExcelDrawingCollection<T>.
Property Value
- System.Int32
Item[Int32]
Gets the element at the specified index.
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.
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.
Clear()
Removes all elements from the ExcelDrawingCollection<T>.
Contains(T)
Determines whether an element is in the ExcelDrawingCollection<T>.
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>
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>.
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.
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.
Remove(T)
Removes the first occurrence of a specific object from the ExcelDrawingCollection<T>.
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>.
Parameters
index
- System.Int32
The zero-based index of the element to remove.