TX Text Control .NET for WPF

IndexOf Method

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

Description

Gets the index of the specified field adapter in the collection.

Syntax

public int IndexOf(FieldAdapter fieldAdapter);

Parameters

ParameterDescription
fieldAdapter

Specifies the field adapter whose index should be looked up.

Return Value

The integer returned by the function represents the field adapter's position in the collection. If the specified field adapter is not in the collection, a negative value is returned.

Examples

The following example uses Index Of in a focused Field Adapter Collection workflow.

var result = fieldAdapterCollection.IndexOf(new TXTextControl.DocumentServer.Fields.CheckBoxContentControl());
Console.WriteLine($"Index Of result: {result}");