TX Text Control .NET for WPF

GetItem Method

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

Description

Gets a particular signature field from the collection.

Syntax

GetItem()

Gets the signature field selected by the user or null if no signature field is selected.

public SignatureField GetItem();

GetItem(int)

Gets the signature field with the specified identifier.

public SignatureField GetItem(int id);
ParameterDescription
id

Specifies the signature field's identifier set with the signature field's constructor or the ID property. The method returns null, if a signature field with the specified identifier does not exist.

GetItem(string)

Gets the signature field with the specified name.

public SignatureField GetItem(string name);
ParameterDescription
name

Specifies the signature field's name set with set with the signature field's constructor or the Name property. The method returns null, if a signature field with the specified name does not exist.

Return Value

The return value is null, if a signature field with the specified parameters could not be found. Otherwise, it is an object of the type SignatureField.

Examples

The following example works with signature fields in the current document by using SignatureFieldCollection.GetItem.

SignatureFieldCollection signatureFieldCollection = textControl.SignatureFields;
signatureFieldCollection.Add(new SignatureField(new System.Drawing.Size(3000, 1000), "ApproverSignature", 100), FrameInsertionMode.AsCharacter);

var result = signatureFieldCollection.GetItem(100);
Console.WriteLine($"Get Item result: {result}");