Class
StructureElementsCollection

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:

cs-api-definition
public class StructureElementsCollection : IEnumerable

Inheritance: objectStructureElementsCollection

Implements: IEnumerable

Properties

Count

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

Declaration

cs-api-definition
public int Count { get; }

Property Value

int

IsReadOnly

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

Declaration

cs-api-definition
public bool IsReadOnly { get; }

Property Value

bool

this[int]

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

Declaration

cs-api-definition
public StructureElement this[int index] { get; set; }

Parameters

index

int

The index.

Property Value

StructureElement

The structure element at the specified index.

Methods

AddStructureElement(StructureTagType)

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

Declaration

cs-api-definition
public StructureElement AddStructureElement(StructureTagType tag)

Parameters

tag

StructureTagType

The tag to associate with the structure element.

Returns

StructureElement

The newly created StructureElement.

AddStructureElement(string, StructureTagType)

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

Declaration

cs-api-definition
public StructureElement AddStructureElement(string customTag, StructureTagType tag)

Parameters

customTag

string

The custom tag to assign to the new structure element.

tag

StructureTagType

The standard structure tag type mapped to the custom tag.

Returns

StructureElement

The newly created StructureElement.

Clear()

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

Declaration

cs-api-definition
public void Clear()

Contains(StructureElement)

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

Declaration

cs-api-definition
public bool Contains(StructureElement item)

Parameters

item

StructureElement

The structure element to locate in the collection.

Returns

bool

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

CopyTo(StructureElement[], int)

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

Declaration

cs-api-definition
public void CopyTo(StructureElement[] array, int arrayIndex)

Parameters

array

StructureElement[]

The array to copy elements to.

arrayIndex

int

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

GetEnumerator()

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

Declaration

cs-api-definition
public IEnumerator<StructureElement> GetEnumerator()

Returns

IEnumerator<StructureElement>

An enumerator for the collection.

IndexOf(StructureElement)

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

Declaration

cs-api-definition
public int IndexOf(StructureElement item)

Parameters

item

StructureElement

The structure element to locate in the collection.

Returns

int

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

Insert(int, StructureElement)

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

Declaration

cs-api-definition
public void Insert(int index, StructureElement item)

Parameters

index

int

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

item

StructureElement

The structure element to insert.

Remove(StructureElement)

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

Declaration

cs-api-definition
public bool Remove(StructureElement item)

Parameters

item

StructureElement

The structure element to remove.

Returns

bool

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

RemoveAt(int)

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

Declaration

cs-api-definition
public void RemoveAt(int index)

Parameters

index

int

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