TX Text Control .NET for WPF

Format Property

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

Description

Gets or sets the field's format. The property's value can be one of the ApplicationFieldFormat values. If the format of the field is changed, its type name and parameters must also be changed.

Syntax

public ApplicationFieldFormat Format { get; set; }

Members

ValueDescription
MSWordThe field is supported and defined through Microsoft Word.
HighEditThe field is supported and defined through the Heiler HighEdit component.

Examples

The following example inserts and configures a Word-compatible mail-merge field by using ApplicationField.Format.

textControl.Text = "Dear Customer";
textControl.InputPosition = new InputPosition(5);
ApplicationField applicationField = new(ApplicationFieldFormat.MSWord, "MERGEFIELD", "Customer", new[] { "CustomerName" });
textControl.ApplicationFields.Add(applicationField);

applicationField.Format = ApplicationFieldFormat.MSWord;
Console.WriteLine($"Format used by Application Field: {applicationField.Format}");