[]
        
(Showing Draft Content)

GrapeCity.Documents.Svg.SvgElementCollection

Class SvgElementCollection

Namespace
GrapeCity.Documents.Svg
Assembly
GcDocs.Imaging.dll

Represents a collection of elements derived from SvgElement.

public class SvgElementCollection : IList<SvgElement>, ICollection<SvgElement>, IEnumerable<SvgElement>, IEnumerable
Inheritance
object
SvgElementCollection
Implements
System.Collections.Generic.IList<T><SvgElement>
System.Collections.Generic.ICollection<T><SvgElement>
System.Collections.Generic.IEnumerable<T><SvgElement>
System.Collections.IEnumerable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Properties

Capacity

Gets the total number of elements the internal data structure can hold without resizing.

public int Capacity { get; }

Property Value

int

Count

Gets the number of elements contained in the SvgElementCollection.

public int Count { get; }

Property Value

int

this[int]

Gets or sets the element at the specified index.

public SvgElement this[int index] { get; set; }

Parameters

index int

Property Value

SvgElement

Owner

Gets the owner SvgElement.

public SvgElement Owner { get; }

Property Value

SvgElement

Methods

Add(SvgElement)

Adds the specified element to the end of the SvgElementCollection.

public void Add(SvgElement element)

Parameters

element SvgElement

AddRange(params SvgElement[])

Adds the elements to the end of the SvgElementCollection.

public void AddRange(params SvgElement[] elements)

Parameters

elements SvgElement[]

AddRange(IEnumerable<SvgElement>)

Adds the elements of the specified collection to the end of the SvgElementCollection.

public void AddRange(IEnumerable<SvgElement> collection)

Parameters

collection System.Collections.Generic.IEnumerable<T><SvgElement>

Clear()

Removes all elements from the SvgElementCollection.

public void Clear()

Contains(SvgElement)

Determines whether an element is in the SvgElementCollection.

public bool Contains(SvgElement element)

Parameters

element SvgElement

Returns

bool

CopyTo(SvgElement[], int)

Copies the entire SvgElementCollection to a compatible one-dimensional array, starting at the specified index of the target array.

public void CopyTo(SvgElement[] array, int arrayIndex)

Parameters

array SvgElement[]

The one-dimensional Array that is the destination of the elements.

arrayIndex int

The zero-based index in array at which copying begins.

EnsureCapacity(int)

Ensures that the capacity of this collection is at least the specified capacity.

public int EnsureCapacity(int capacity)

Parameters

capacity int

The minimum capacity to ensure.

Returns

int

The new capacity of the SvgElementCollection.

GetEnumerator()

Returns an enumerator that iterates through the SvgElementCollection.

public IEnumerator<SvgElement> GetEnumerator()

Returns

System.Collections.Generic.IEnumerator<T><SvgElement>

IndexOf(SvgElement)

Searches for the specified element and returns the zero-based index.

public int IndexOf(SvgElement element)

Parameters

element SvgElement

The element to locate.

Returns

int

The zero-based index of the element, if found; otherwise, -1.

Insert(int, SvgElement)

Inserts an element into the SvgElementCollection at the specified index.

public void Insert(int index, SvgElement element)

Parameters

index int

The zero-based index at which element should be inserted.

element SvgElement

The object to insert.

Move(int, int)

Moves the element at the fromIndex to the position of the toIndex.

public void Move(int fromIndex, int toIndex)

Parameters

fromIndex int
toIndex int

Remove(SvgElement)

Removes the specific element from the SvgElementCollection.

public bool Remove(SvgElement element)

Parameters

element SvgElement

The element to remove.

Returns

bool

true if element is successfully removed. false if element was not found.

RemoveAt(int)

Removes the element at the specified index of the SvgElementCollection.

public void RemoveAt(int index)

Parameters

index int

The zero-based index of the element to remove.

RemoveRange(int, int)

Removes a range of elements from the SvgElementCollection.

public void RemoveRange(int index, int count)

Parameters

index int

The zero-based starting index of the range of elements to remove.

count int

The number of elements to remove.

Swap(int, int)

Swaps two elements at the index1 and index2.

public void Swap(int index1, int index2)

Parameters

index1 int
index2 int

TrimExcess()

Sets the capacity to the actual number of elements in the SvgElementCollection.

public void TrimExcess()