Class
DocumentElementCollection

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

Definition

Namespace:Telerik.Windows.Documents.Model

Assembly:Telerik.Windows.Controls.RichTextBox.dll

Syntax:

cs-api-definition
public class DocumentElementCollection : ICollection<DocumentElement>, IEnumerable<DocumentElement>, IEnumerable

Inheritance: objectDocumentElementCollection

Implements: ICollection<DocumentElement>IEnumerableIEnumerable<DocumentElement>

Constructors

DocumentElementCollection(DocumentElement)

Initializes a new instance of the DocumentElementCollection class.

Declaration

cs-api-definition
public DocumentElementCollection(DocumentElement owner)

Parameters

owner

DocumentElement

The owner.

Properties

Count

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

Declaration

cs-api-definition
public int Count { get; }

Property Value

int

Implements ICollection<DocumentElement>.Count

First

Gets the first LayoutBox inside the collection.

Declaration

cs-api-definition
public LayoutBox First { get; }

Property Value

LayoutBox

The first.

IsEmpty

Gets a value indicating whether this instance is empty.

Declaration

cs-api-definition
public bool IsEmpty { get; }

Property Value

bool

true if this instance is empty; otherwise, false.

IsReadOnly

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

Declaration

cs-api-definition
public bool IsReadOnly { get; }

Property Value

bool

Exceptions

NotImplementedException

Implements ICollection<DocumentElement>.IsReadOnly

Methods

Add(DocumentElement)

Adds an item to the collection.

Declaration

cs-api-definition
public void Add(DocumentElement item)

Parameters

item

DocumentElement

The object to add to the collection.

Implements ICollection<DocumentElement>.Add(DocumentElement)

AddAfter(DocumentElement, DocumentElement)

Adds an item after another one into the collection.

Declaration

cs-api-definition
public void AddAfter(DocumentElement item, DocumentElement newItem)

Parameters

item

DocumentElement

The object after which another object should be added.

newItem

DocumentElement

The object to add to the collection.

AddBefore(DocumentElement, DocumentElement)

Adds an item before another one into the collection.

Declaration

cs-api-definition
public void AddBefore(DocumentElement item, DocumentElement newItem)

Parameters

item

DocumentElement

The object before which another object should be added.

newItem

DocumentElement

The object to add to the collection.

Clear()

Removes all items from the collection.

Declaration

cs-api-definition
public void Clear()

Implements ICollection<DocumentElement>.Clear()

Contains(DocumentElement)

Determines whether the collection contains a specific object.

Declaration

cs-api-definition
public bool Contains(DocumentElement item)

Parameters

item

DocumentElement

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)

CopyTo(DocumentElement[], int)

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

Declaration

cs-api-definition
public void CopyTo(DocumentElement[] array, int arrayIndex)

Parameters

array

DocumentElement[]

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

arrayIndex

int

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

Exceptions

NotImplementedException

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

Detach(DocumentElement)

Removes an elements from its Parent.

Declaration

cs-api-definition
public bool Detach(DocumentElement item)

Parameters

item

DocumentElement

The object to detach from the collection.

Returns

bool

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration

cs-api-definition
public IEnumerator<DocumentElement> GetEnumerator()

Returns

IEnumerator<DocumentElement>

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

Implements IEnumerable<DocumentElement>.GetEnumerator()

Remove(DocumentElement)

Removes a specific object from the collection.

Declaration

cs-api-definition
public bool Remove(DocumentElement item)

Parameters

item

DocumentElement

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)