New to Telerik UI for WPFStart a free 30-day trial

Represents a collection of document elements in Telerik's document model.

Definition

Namespace:Telerik.Windows.Documents.Model

Assembly:Telerik.Windows.Controls.RichTextBox.dll

Syntax:

C#
public class DocumentElementCollection : ICollection<DocumentElement>, IEnumerable<DocumentElement>, IEnumerable

Inheritance: objectDocumentElementCollection

Implements: ICollection<DocumentElement>IEnumerableIEnumerable<DocumentElement>

Constructors

Initializes a new instance of the DocumentElementCollection class.

C#
public DocumentElementCollection(DocumentElement owner)
Parameters:ownerDocumentElement

The owner.

Properties

Gets the number of elements contained in the ICollection<T>.

C#
public int Count { get; }

Implements: ICollection<DocumentElement>.Count

Gets the first LayoutBox inside the collection.

C#
public LayoutBox First { get; }
Property Value:

The first.

Gets a value indicating whether this instance is empty.

C#
public bool IsEmpty { get; }
Property Value:

true if this instance is empty; otherwise, false.

Gets a value indicating whether the ICollection<T> is read-only.

C#
public bool IsReadOnly { get; }
Exceptions:

NotImplementedException

Implements: ICollection<DocumentElement>.IsReadOnly

Methods

Adds an item to the collection.

C#
public void Add(DocumentElement item)
Parameters:itemDocumentElement

The object to add to the collection.

Implements: ICollection<DocumentElement>.Add(DocumentElement)

Adds an item after another one into the collection.

C#
public void AddAfter(DocumentElement item, DocumentElement newItem)
Parameters:itemDocumentElement

The object after which another object should be added.

newItemDocumentElement

The object to add to the collection.

Adds an item before another one into the collection.

C#
public void AddBefore(DocumentElement item, DocumentElement newItem)
Parameters:itemDocumentElement

The object before which another object should be added.

newItemDocumentElement

The object to add to the collection.

Removes all items from the collection.

C#
public void Clear()

Implements: ICollection<DocumentElement>.Clear()

Determines whether the collection contains a specific object.

C#
public bool Contains(DocumentElement item)
Parameters:itemDocumentElement

The object to locate in the collection.

Returns:

bool

true if the object is found in the collection; otherwise, false.

Exceptions:

NotImplementedException

Implements: ICollection<DocumentElement>.Contains(DocumentElement)

Copies the elements of the ICollection<T> to an Array, starting at a particular Array index.

C#
public void CopyTo(DocumentElement[] array, int arrayIndex)
Parameters:arrayDocumentElement[]

The one-dimensional Array that is the destination of the elements copied from the ICollection<T>. The Array must have zero-based indexing.

arrayIndexint

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

Exceptions:

NotImplementedException

Implements: ICollection<DocumentElement>.CopyTo(DocumentElement[], int)

Removes an elements from its Parent.

C#
public bool Detach(DocumentElement item)
Parameters:itemDocumentElement

The object to detach from the collection.

Returns:

bool

Returns an enumerator that iterates through the collection.

C#
public IEnumerator<DocumentElement> GetEnumerator()
Returns:

IEnumerator<DocumentElement>

An enumerator that can be used to iterate through the collection.

Implements: IEnumerable<DocumentElement>.GetEnumerator()

Removes a specific object from the collection.

C#
public bool Remove(DocumentElement item)
Parameters:itemDocumentElement

The object to remove from the collection.

Returns:

bool

true if the item has been successfully removed from the collection; otherwise, false.

Implements: ICollection<DocumentElement>.Remove(DocumentElement)