TX Text Control .NET Server

GetTextFields Method

Method|Introduced in 24.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.dll

Description

Returns a collection containing text fields of the specified types.

Syntax

public TextFieldCollection GetTextFields(TextFieldType fieldType);

Parameters

ParameterDescription
fieldType

Specifies types of text fields. It can be a combination of the TextFieldType values.

Return Value

The return value is a collection of all fields of the specified types.

Examples

The following example applies bold formatting through the text frame's selection by using TextFrame.get_TextFields.

Selection formattedSelection = textFrame.Selection;
formattedSelection.Bold = true;
textFrame.Selection = formattedSelection;

var result = textFrame.GetTextFields(TextFieldType.HypertextLink);
Console.WriteLine($"Get Text Fields result: {result}");