TX Text Control .NET for WPF

GetEnumerator Method

Method|Introduced in 25.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WPF.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

Returns an enumerator that can be used to iterate through the collection.

Syntax

public EditableRegionCollection.EditableRegionEnumerator GetEnumerator();

Return Value

The return value is an IEnumerator that represents the collection.

Examples

The following example works with editable regions in the current document by using EditableRegionCollection.GetEnumerator.

textControl.Text = "Customer: Contoso Ltd.";
textControl.Select(10, 12);
EditableRegionCollection editableRegionCollection = textControl.EditableRegions;
editableRegionCollection.Add(new EditableRegion("ReviewTeam", 100));

IEnumerator enumerator = editableRegionCollection.GetEnumerator();

while (enumerator.MoveNext())
{
    EditableRegion editableRegion = (EditableRegion)enumerator.Current;
    Console.WriteLine(editableRegion);
}