TX Text Control .NET for WPF

GetItems 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

Gets all editable regions at the current text input position. The method returns null, if there is no region at the current input position.

Syntax

public EditableRegion[] GetItems();

Return Value

The return value is null, if there is no editable region at the current input position. Otherwise, it is an array of objects of the type EditableRegion.

Examples

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

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

EditableRegion[] results = editableRegionCollection.GetItems();
foreach (EditableRegion editableRegion in results)
{
    Console.WriteLine(editableRegion);
}