New to Telerik Document ProcessingStart a free 30-day trial

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:

C#
public class StructureElementsCollection : IList<StructureElement>, ICollection<StructureElement>, IEnumerable<StructureElement>, IEnumerable

Inheritance: objectStructureElementsCollection

Implements: ICollection<StructureElement>IEnumerableIEnumerable<StructureElement>IList<StructureElement>

Methods

Creates, appends, and returns a new structure element with the provided custom tag mapped to the given standard type.

C#
public StructureElement AddStructureElement(string customTag, StructureTagType tag)
Parameters:customTagstring

The custom tag to assign to the new structure element.

tagStructureTagType

The standard structure tag type mapped to the custom tag.

Returns:

StructureElement

The newly created StructureElement.

Creates, appends, and returns a new StructureElement using the specified standard structure tag.

C#
public StructureElement AddStructureElement(StructureTagType tag)
Parameters:tagStructureTagType

The tag to associate with the structure element.

Returns:

StructureElement

The newly created StructureElement.

Removes all elements, clearing parent references from each before disposal.

C#
public void Clear()

Implements: ICollection<StructureElement>.Clear()

Determines whether the specified element instance is contained in the collection.

C#
public bool Contains(StructureElement item)
Parameters:itemStructureElement

The structure element to locate in the collection.

Returns:

bool

true if the structure element is found; otherwise, false.

Implements: ICollection<StructureElement>.Contains(StructureElement)

Copies all elements to the target array starting at the provided destination index.

C#
public void CopyTo(StructureElement[] array, int arrayIndex)
Parameters:arrayStructureElement[]

The array to copy elements to.

arrayIndexint

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

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

Returns an enumerator for iterating through the elements in order of insertion.

C#
public IEnumerator<StructureElement> GetEnumerator()
Returns:

IEnumerator<StructureElement>

An enumerator for the collection.

Implements: IEnumerable<StructureElement>.GetEnumerator()

Gets the zero‑based index of the specified element instance, or -1 if not found.

C#
public int IndexOf(StructureElement item)
Parameters:itemStructureElement

The structure element to locate in the collection.

Returns:

int

The index of the structure element if found; otherwise, -1.

Implements: IList<StructureElement>.IndexOf(StructureElement)

Inserts the provided element at the given index, updating its parent reference.

C#
public void Insert(int index, StructureElement item)
Parameters:indexint

The zero-based index at which the structure element should be inserted.

itemStructureElement

The structure element to insert.

Implements: IList<StructureElement>.Insert(int, StructureElement)

Removes the first matching element, nulling its parent reference if found.

C#
public bool Remove(StructureElement item)
Parameters:itemStructureElement

The structure element to remove.

Returns:

bool

true if the structure element was successfully removed; otherwise, false.

Implements: ICollection<StructureElement>.Remove(StructureElement)

Removes the element at the specified index and clears its parent reference.

C#
public void RemoveAt(int index)
Parameters:indexint

The zero-based index of the structure element to remove.

Implements: IList<StructureElement>.RemoveAt(int)

Properties

Gets the current number of structure elements held in the collection.

C#
public int Count { get; }

Implements: ICollection<StructureElement>.Count

Gets a value indicating whether the collection is read‑only (always false for this implementation).

C#
public bool IsReadOnly { get; }

Implements: ICollection<StructureElement>.IsReadOnly

Gets or sets the StructureElement at the given zero‑based index.

C#
public StructureElement this[int index] { get; set; }
Parameters:indexint

The index.

Property Value:

The structure element at the specified index.

Implements: IList<StructureElement>.this[int]