Mutable list managing child StructureElement nodes of a structure tree, enforcing parent linkage on insert/remove.
Definition
Namespace:Telerik.Windows.Documents.Fixed.Model
Assembly:Telerik.Windows.Documents.Fixed.dll
Syntax:
public class StructureElementsCollection : IList<StructureElement>, ICollection<StructureElement>, IEnumerable<StructureElement>, IEnumerable
Inheritance: objectStructureElementsCollection
Implements:
Methods
Creates, appends, and returns a new structure element with the provided custom tag mapped to the given standard type.
public StructureElement AddStructureElement(string customTag, StructureTagType tag)
The custom tag to assign to the new structure element.
tagStructureTagTypeThe standard structure tag type mapped to the custom tag.
Returns:The newly created StructureElement.
Creates, appends, and returns a new StructureElement using the specified standard structure tag.
public StructureElement AddStructureElement(StructureTagType tag)
The tag to associate with the structure element.
Returns:The newly created StructureElement.
Removes all elements, clearing parent references from each before disposal.
public void Clear()
Implements:
Determines whether the specified element instance is contained in the collection.
public bool Contains(StructureElement item)
The structure element to locate in the collection.
Returns:true if the structure element is found; otherwise, false.
Implements:
Copies all elements to the target array starting at the provided destination index.
public void CopyTo(StructureElement[] array, int arrayIndex)
The array to copy elements to.
arrayIndexintThe zero-based index in the array at which copying begins.
Implements:
Returns an enumerator for iterating through the elements in order of insertion.
public IEnumerator<StructureElement> GetEnumerator()
An enumerator for the collection.
Implements:
Gets the zero‑based index of the specified element instance, or -1 if not found.
public int IndexOf(StructureElement item)
The structure element to locate in the collection.
Returns:The index of the structure element if found; otherwise, -1.
Implements:
Inserts the provided element at the given index, updating its parent reference.
public void Insert(int index, StructureElement item)
The zero-based index at which the structure element should be inserted.
itemStructureElementThe structure element to insert.
Implements:
Removes the first matching element, nulling its parent reference if found.
public bool Remove(StructureElement item)
The structure element to remove.
Returns:true if the structure element was successfully removed; otherwise, false.
Implements:
Removes the element at the specified index and clears its parent reference.
public void RemoveAt(int index)
The zero-based index of the structure element to remove.
Implements:
Properties
Gets the current number of structure elements held in the collection.
public int Count { get; }
Implements:
Gets a value indicating whether the collection is read‑only (always false for this implementation).
public bool IsReadOnly { get; }
Implements:
Gets or sets the StructureElement at the given zero‑based index.
public StructureElement this[int index] { get; set; }
The index.
Property Value:The structure element at the specified index.
Implements: