TX Text Control .NET Server

TextComponent Property

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

Description

Gets or sets the object of type ServerTextControl that is associated with the DocumentController component. Invoking one of the DocumentController's instance methods will result in an exception being thrown, if the TextComponent property is left unset.

Syntax

public Component TextComponent { get; set; }

Examples

The following example creates a new DocumentServer.DocumentController object and associates a ServerTextControl with it:

TXTextControl.DocumentController documentController1 = new TXTextControl.DocumentController();
TXTextControl.ServerTextControl serverTextControl1 = new TXTextControl.ServerTextControl();

documentController1.TextComponent = serverTextControl1;

The following example uses DocumentController.TextComponent to configure text component as part of the document controller workflow. The configured value is checked before the workflow continues.

documentController.TextComponent = new System.ComponentModel.Component();
if (documentController.TextComponent != null)
{
    Console.WriteLine("Document Controller: Text Component is available.");
}