TX Text Control .NET for Windows Forms

DocumentTarget Constructor

Constructor
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

Creates a new instance of the DocumentTarget class.

Syntax

DocumentTarget(string)

Creates a new instance of the DocumentTarget class with the specified target name.

public DocumentTarget(string targetName);
ParameterDescription
targetName

Specifies the name of the target.

DocumentTarget(string, int)

Creates a new instance of the DocumentTarget class with the specified target name and position.

public DocumentTarget(string targetName, int position);
ParameterDescription
targetName

Specifies the name of the target.

position

Specifies the one-based character position where to insert the target. The target's position is at the left edge of this charcter.

Examples

The following example creates a named destination for an internal document link.

DocumentTarget documentTarget = new("CustomerDetails");
textControl.DocumentTargets.Add(documentTarget);