Class
DocumentElementCollection<T, TOwner>

Generic collection for document elements that enforces parent–child relationships and safe insertion into an owning container.

Definition

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

Assembly:Telerik.Windows.Documents.Fixed.dll

Type Parameters:

T

The type of document elements contained in the collection.

TOwner

The type of the owner element that contains this collection.

Syntax:

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

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

Derived Classes: AnnotationCollectionBookmarksCollectionContentElementCollectionPageCollection

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]

Constructors

DocumentElementCollection(TOwner)

Construct a collection bound to the specified owner for managing child elements with enforced parent–child relationships.

Declaration

cs-api-definition
public DocumentElementCollection(TOwner parent)

Parameters

parent

TOwner

The parent element that owns this collection.

Methods

SetParent(T, TOwner)

Establishes the parent-child relationship between a document element and its parent container.

Declaration

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

Parameters

item

T

The document element to set the parent for.

parent

TOwner

The parent container to assign to the document element.

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

VerifyDocumentElementOnInsert(T)

Validates that a document element can be safely added to the collection by checking its parent associations.

Declaration

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

Parameters

item

T

The document element to validate before insertion.

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