ClassSpecializedDocumentElementCollection<TInheritor>
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
Count
Gets the number of elements contained in the collection.
First
Gets the first element in the collection of specialized document elements.
Declaration
public TInheritor First { get; }
Property Value
TInheritor
InnerCollection
Declaration
protected DocumentElementCollection InnerCollection { get; }
Property Value
IsReadOnly
Gets a value indicating whether the collection is read-only.
Last
Gets the last element in the collection of specialized document elements.
Declaration
public TInheritor Last { get; }
Property Value
TInheritor
Methods
Add(TInheritor)
Adds a DocumentElement to the collection.
Declaration
public void Add(TInheritor item)
Parameters
item
TInheritor
The object to add to the ICollection<T>.
Implements
AddAfter(TInheritor, TInheritor)
Adds a new element of type TInheritor after a specified existing element in the collection.
Declaration
public void AddAfter(TInheritor item, TInheritor newItem)
Parameters
item
TInheritor
The element after which the new element will be added.
newItem
TInheritor
The new element to be added to the collection.
AddBefore(TInheritor, TInheritor)
Adds a new element before a specified existing element in the collection.
Declaration
public void AddBefore(TInheritor item, TInheritor newItem)
Parameters
item
TInheritor
The new element to be added to the collection.
newItem
TInheritor
The existing element before which the new element will be inserted.
AddRange(IEnumerable<TInheritor>)
Adds a collection of elements to the specialized document element collection.
Declaration
public void AddRange(IEnumerable<TInheritor> range)
Parameters
range
IEnumerable<TInheritor>
The collection of elements to add to the collection.
Clear()
Clears all elements from the collection.
Declaration
public void Clear()
Implements
Remarks
This method removes all items from the current collection, resetting it to an empty state.
Contains(TInheritor)
Determines whether the collection contains a specific element.
Declaration
public bool Contains(TInheritor item)
Parameters
item
TInheritor
The element to locate in the collection.
Returns
true if the collection contains the element; otherwise, false.
Implements
CopyTo(TInheritor[], int)
Copies the elements of the collection to a specified array, starting at a particular index.
Declaration
public void CopyTo(TInheritor[] array, int arrayIndex)
Parameters
array
TInheritor[]
The one-dimensional array that is the destination of the elements copied from the collection. The array must have a zero-based index.
arrayIndex
The zero-based index in the destination array at which storing the copied elements will begin.
Implements
Detach(TInheritor)
Detaches the specified element from the collection.
Declaration
public bool Detach(TInheritor item)
Parameters
item
TInheritor
The element to be detached from the collection.
Returns
Returns the detached element.
GetEnumerator()
Returns an enumerator that iterates through the collection of specialized document elements.
Declaration
public IEnumerator<TInheritor> GetEnumerator()
Returns
IEnumerator<TInheritor>
A enumerator that provides iteration over the current collection of specialized document elements.
Implements
OnCollectionChanged()
Called when the collection is changed. Raises CollectionChanged event.
Declaration
protected virtual void OnCollectionChanged()
OnElementAdded(DocumentElement)
Called when DocumentElement is added.
Declaration
protected virtual void OnElementAdded(DocumentElement element)
Parameters
element
The element.
Remove(TInheritor)
Removes the specified element from the collection.
Declaration
public bool Remove(TInheritor item)
Parameters
item
TInheritor
The element to be removed from the collection.
Returns
True if the element was successfully removed; otherwise, false.
Implements
ToArray()
Converts the collection to an array.
Declaration
public TInheritor[] ToArray()
Returns
TInheritor[]
An array of DocumentElements.
VerifyChildrenOverride(TInheritor)
Declaration
protected virtual void VerifyChildrenOverride(TInheritor item)
Parameters
item
TInheritor
Events
CollectionChanged
Occurs when the collection is changed.
ElementAdded
Occurs when a DocumentElement is added.
Declaration
public event EventHandler<ElementAddedEventArgs> ElementAdded
Event Value