Class
DocumentElementCollection<T, TOwner>

Base collection for document elements that enforces parent-child relationships, validates document ownership, and supports cloning operations.

Definition

Namespace:Telerik.Windows.Documents.Flow.Model.Collections

Assembly:Telerik.Windows.Documents.Flow.dll

Type Parameters:

T

The type of the document elements in the collection.

TOwner

The type of the owner.

Syntax:

cs-api-definition
public class DocumentElementCollection<T, TOwner> : DocumentElementCollectionBase<T, TOwner>, IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable where T : DocumentElementBase where TOwner : DocumentElementBase

Inheritance: objectDocumentElementCollectionBase<T, TOwner>DocumentElementCollection<T, TOwner>

Derived Classes: BlockCollectionCommentCollectionInlineCollectionSectionCollectionTableCellCollectionTableRowCollection

Implements: ICollection<T>IEnumerableIEnumerable<T>IList<T>

Inherited Members DocumentElementCollectionBase<T, TOwner>.GetEnumerator()DocumentElementCollectionBase<T, TOwner>.IndexOf(T)DocumentElementCollectionBase<T, TOwner>.Insert(int, T)DocumentElementCollectionBase<T, TOwner>.InsertRange(int, IEnumerable<T>)DocumentElementCollectionBase<T, TOwner>.RemoveAt(int)DocumentElementCollectionBase<T, TOwner>.RemoveRange(int, int)DocumentElementCollectionBase<T, TOwner>.OnAfterAdd(T)DocumentElementCollectionBase<T, TOwner>.OnAfterRemove(T)DocumentElementCollectionBase<T, TOwner>.Clear()DocumentElementCollectionBase<T, TOwner>.Contains(T)DocumentElementCollectionBase<T, TOwner>.CopyTo(T[], int)DocumentElementCollectionBase<T, TOwner>.Remove(T)DocumentElementCollectionBase<T, TOwner>.Add(T)DocumentElementCollectionBase<T, TOwner>.VerifyDocumentElementOnInsert(T)DocumentElementCollectionBase<T, TOwner>.SetParent(T, TOwner)DocumentElementCollectionBase<T, TOwner>.CountDocumentElementCollectionBase<T, TOwner>.OwnerDocumentElementCollectionBase<T, TOwner>.this[int]

Methods

SetParent(T, TOwner)

Assigns the specified parent to the document element, establishing the parent-child relationship in the document tree.

Declaration

cs-api-definition
protected override void SetParent(T item, TOwner parent)

Parameters

item

T

The document element.

parent

TOwner

The parent which should be set to the document element.

Overrides DocumentElementCollectionBase<T, TOwner>.SetParent(T, TOwner)

VerifyDocumentElementOnInsert(T)

Validates that the element belongs to the same document as the owner and has no existing parent before allowing insertion.

Declaration

cs-api-definition
protected override void VerifyDocumentElementOnInsert(T item)

Parameters

item

T

The item.

Overrides DocumentElementCollectionBase<T, TOwner>.VerifyDocumentElementOnInsert(T)