TX Text Control .NET for Windows Forms

DocumentTarget Property

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

Description

Gets or sets an object of the type DocumentTarget specifying to where the link points. If such an object does not exist, the property returns null.

Syntax

public DocumentTarget DocumentTarget { get; set; }

Examples

The following example creates an internal link to the customer-details destination by using DocumentLink.DocumentTarget.

DocumentTarget target = new("CustomerDetails");
textControl.DocumentTargets.Add(target);
DocumentLink documentLink = new("View customer details", target);
textControl.DocumentLinks.Add(documentLink);

documentLink.DocumentTarget = new DocumentTarget("CustomerName");
if (documentLink.DocumentTarget != null)
{
    Console.WriteLine("Document Link: Document Target is available.");
}