Class DocumentElementCollection<T, TOwner>
Represents a base collection for document elements with automatic parent-child relationship management.
Inheritance
Inherited Members
Namespace: Telerik.Windows.Documents.Fixed.Model.Collections
Assembly: Telerik.Windows.Documents.Fixed.dll
Syntax
public class DocumentElementCollection<T, TOwner> : DocumentElementCollectionBase<T, TOwner>, IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable where T : FixedDocumentElementBase where TOwner : IFixedDocumentElement
Type Parameters
T
The type of document elements contained in the collection. |
TOwner
The type of the owner element that contains this collection. |
Constructors
DocumentElementCollection(TOwner)
Initializes a new instance of the DocumentElementCollection<T, TOwner> class with the specified parent element.
Declaration
public DocumentElementCollection(TOwner parent)
Parameters
TOwner
parent
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
protected override void SetParent(T item, TOwner parent)
Parameters
T
item
The document element to set the parent for. |
TOwner
parent
The parent container to assign to the document element. |
Overrides
VerifyDocumentElementOnInsert(T)
Validates that a document element can be safely added to the collection by checking its parent associations.
Declaration
protected override void VerifyDocumentElementOnInsert(T item)
Parameters
T
item
The document element to validate before insertion. |