TX Text Control .NET Server

TextComponent Property

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

Description

Gets or sets the TextComponent object which is associated with the MailMerge component. It must be of the type ServerTextControl, TextControl or WPF.TextControl. The PageSize, PageMargins and Landscape properties will be used, if UseTemplateFormat has been set to false. The ServerTextControl.FormattingPrinter property will be used internally to format the text. It returns null when not specified.

Syntax

public object TextComponent { get; set; }

Examples

The following example creates a new MailMerge object and associates a ServerTextControl with it:

TXTextControl.MailMerge mailMerge1 = new TXTextControl.MailMerge();
TXTextControl.ServerTextControl serverTextControl1 = new TXTextControl.ServerTextControl();

mailMerge1.TextComponent = serverTextControl1;

The following example uses MailMerge.TextComponent to configure text component as part of the mail merge workflow. The configured value is checked before the workflow continues.

mailMerge.TextComponent = "Approved";
if (mailMerge.TextComponent != null)
{
    Console.WriteLine("Mail Merge: Text Component is available.");
}