Represents a collection of specialized document elements of type TInheritor.
Definition
Namespace:Telerik.Windows.Documents.Model
Assembly:Telerik.Windows.Controls.RichTextBox.dll
Type Parameters:
TInheritor
The type of the elements in the collection.
Syntax:
public abstract class SpecializedDocumentElementCollection<TInheritor> : ICollection<TInheritor>, IEnumerable<TInheritor>, IList, ICollection, IEnumerable where TInheritor : DocumentElement
Inheritance: objectSpecializedDocumentElementCollection<TInheritor>
Derived Classes:
Implements:
Properties
Gets the number of elements contained in the collection.
public int Count { get; }
Implements:
First
TInheritor
Gets the first element in the collection of specialized document elements.
public TInheritor First { get; }
protected DocumentElementCollection InnerCollection { get; }
Gets a value indicating whether the collection is read-only.
public bool IsReadOnly { get; }
Implements:
Last
TInheritor
Gets the last element in the collection of specialized document elements.
public TInheritor Last { get; }
Methods
Adds a DocumentElement to the collection.
public void Add(TInheritor item)
The object to add to the ICollection<T>.
Implements:
Adds a new element of type TInheritor after a specified existing element in the collection.
public void AddAfter(TInheritor item, TInheritor newItem)
The element after which the new element will be added.
newItemTInheritorThe new element to be added to the collection.
Adds a new element before a specified existing element in the collection.
public void AddBefore(TInheritor item, TInheritor newItem)
The new element to be added to the collection.
newItemTInheritorThe existing element before which the new element will be inserted.
Adds a collection of elements to the specialized document element collection.
public void AddRange(IEnumerable<TInheritor> range)
The collection of elements to add to the collection.
Clears all elements from the collection.
public void Clear()
Implements:
This method removes all items from the current collection, resetting it to an empty state.
Determines whether the collection contains a specific element.
public bool Contains(TInheritor item)
The element to locate in the collection.
Returns:true if the collection contains the element; otherwise, false.
Implements:
Copies the elements of the collection to a specified array, starting at a particular index.
public void CopyTo(TInheritor[] array, int arrayIndex)
The one-dimensional array that is the destination of the elements copied from the collection. The array must have a zero-based index.
arrayIndexintThe zero-based index in the destination array at which storing the copied elements will begin.
Implements:
Detaches the specified element from the collection.
public bool Detach(TInheritor item)
The element to be detached from the collection.
Returns:Returns the detached element.
GetEnumerator()
IEnumerator<TInheritor>
Returns an enumerator that iterates through the collection of specialized document elements.
public IEnumerator<TInheritor> GetEnumerator()
IEnumerator<TInheritor>
A enumerator that provides iteration over the current collection of specialized document elements.
Implements:
Called when the collection is changed. Raises CollectionChanged event.
protected virtual void OnCollectionChanged()
Called when DocumentElement is added.
protected virtual void OnElementAdded(DocumentElement element)
The element.
Removes the specified element from the collection.
public bool Remove(TInheritor item)
The element to be removed from the collection.
Returns:True if the element was successfully removed; otherwise, false.
Implements:
ToArray()
TInheritor[]
Converts the collection to an array.
protected virtual void VerifyChildrenOverride(TInheritor item)
Events
Occurs when the collection is changed.
public event EventHandler CollectionChanged
Occurs when a DocumentElement is added.
public event EventHandler<ElementAddedEventArgs> ElementAdded