Class DocumentElementCollectionBase<T, TOwner>
Provides based functionality for collections of document elements.
Inheritance
Inherited Members
Namespace: Telerik.Windows.Documents.Core.Data
Assembly: Telerik.Windows.Documents.Core.dll
Syntax
public abstract class DocumentElementCollectionBase<T, TOwner> : IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable
  Type Parameters
| 
        T
         The type of the document elements which should be added to the collection.  | 
    
| 
        TOwner
         The type of the owner of the collection.  | 
    
Properties
Count
Gets the number of elements contained in the collection.
Declaration
public int Count { get; }
  Property Value
| 
        System.Int32
         The number of elements contained in the collection.  | 
    
Implements
Item[Int32]
Gets or sets the element at the specified index.
Declaration
public T this[int index] { get; set; }
  Parameters
| 
        System.Int32
        index
         The index.  | 
    
Property Value
| 
        T
         
  | 
    
Implements
Owner
Gets the element holding the collection.
Declaration
protected TOwner Owner { get; }
  Property Value
| 
        TOwner
         The owner element.  | 
    
Methods
Add(T)
Adds an item to the collection.
Declaration
public void Add(T item)
  Parameters
| 
        T
        item
         The element to add to the collection.  | 
    
Implements
Clear()
Removes all items from the collection.
Declaration
public void Clear()
  Implements
Contains(T)
Determines whether the collection contains a specific element.
Declaration
public bool Contains(T item)
  Parameters
| 
        T
        item
         The element to locate in the collection.  | 
    
Returns
| 
        System.Boolean
         
  | 
    
Implements
CopyTo(T[], Int32)
Copies the elements of the collection to an System.Array, starting at a particular System.Array index.
Declaration
public void CopyTo(T[] array, int arrayIndex)
  Parameters
| 
        T[]
        array
         The array.  | 
    
| 
        System.Int32
        arrayIndex
         Index of the array.  | 
    
Implements
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<T> GetEnumerator()
  Returns
| 
        System.Collections.Generic.IEnumerator<T>
         A System.Collections.Generic.IEnumerator<T> that can be used to iterate through the collection.  | 
    
Implements
IndexOf(T)
Determines the index of a specific element in the collection.
Declaration
public int IndexOf(T item)
  Parameters
| 
        T
        item
         The element to locate in the collection.  | 
    
Returns
| 
        System.Int32
         The index of   | 
    
Implements
Insert(Int32, T)
Inserts an element to the collection at the specified index.
Declaration
public void Insert(int index, T item)
  Parameters
| 
        System.Int32
        index
         The zero-based index at which   | 
    
| 
        T
        item
         The element to insert into the collection.  | 
    
Implements
InsertRange(Int32, IEnumerable<T>)
Inserts an elements to the collection at the specified index.
Declaration
public void InsertRange(int index, IEnumerable<T> items)
  Parameters
| 
        System.Int32
        index
         The zero-based index at which   | 
    
| 
        System.Collections.Generic.IEnumerable<T>
        items
         The elements to be inserted into the collection.  | 
    
OnAfterAdd(T)
Called when the element is added.
Declaration
protected virtual void OnAfterAdd(T item)
  Parameters
| 
        T
        item
         The element.  | 
    
OnAfterRemove(T)
Called when the element is removed.
Declaration
protected virtual void OnAfterRemove(T item)
  Parameters
| 
        T
        item
         The element.  | 
    
Remove(T)
Removes the first occurrence of a specific object from the collection.
Declaration
public bool Remove(T item)
  Parameters
| 
        T
        item
         The object to remove from the collection.  | 
    
Returns
| 
        System.Boolean
         
  | 
    
Implements
RemoveAt(Int32)
Removes the element at the specified index.
Declaration
public void RemoveAt(int index)
  Parameters
| 
        System.Int32
        index
         The zero-based index of the item to remove.  | 
    
Implements
RemoveRange(Int32, Int32)
Removes the range.
Declaration
public void RemoveRange(int index, int count)
  Parameters
| 
        System.Int32
        index
         The zero-based index of the item to remove.  | 
    
| 
        System.Int32
        count
         The number of elements to remove.  | 
    
SetParent(T, TOwner)
Sets the parent of the document element.
Declaration
protected abstract void SetParent(T item, TOwner parent)
  Parameters
| 
        T
        item
         The document element.  | 
    
| 
        TOwner
        parent
         The parent which should be set to the document element.  | 
    
VerifyDocumentElementOnInsert(T)
Verifies the validity of the document element before it is inserted in the collection.
Declaration
protected abstract void VerifyDocumentElementOnInsert(T item)
  Parameters
| 
        T
        item
         The item.  | 
    
Explicit Interface Implementations
ICollection<T>.IsReadOnly
Gets a value indicating whether the collection is read-only.
Declaration
bool ICollection<T>.IsReadOnly { get; }
  Returns
| 
        System.Boolean
         
  | 
    
Implements
IEnumerable.GetEnumerator()
Returns an enumerator that iterates through a collection.
Declaration
IEnumerator IEnumerable.GetEnumerator()
  Returns
| 
        System.Collections.IEnumerator
         An System.Collections.IEnumerator object that can be used to iterate through the collection.  |