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.
BringForward(T)
Moves the specified item one position forward in the drawings.
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.
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.
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.
Parameters
index
- System.Int32
The index of the item to bring to the front.
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.
MoveZIndex(T, Int32)
Moves the item forward or backward in the drawings with the given relative index.
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>.
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.
SendBackward(T)
Moves the specified item one position backward in the drawings.
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.
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.
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.
Parameters
index
- System.Int32
The index of the item to send to the back.