TX Text Control .NET for Windows Forms

Name Property

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

Description

Relates a user-defined name to a text field. This can be any kind of text. This name can be used to uniquely identify a text field.

Syntax

public string Name { get; set; }

Examples

The following example inserts a Word-compatible text field into a template by using TextField.Name.

TextField textField = new ApplicationField(ApplicationFieldFormat.MSWord, "MERGEFIELD", "Customer name", new[] { "CustomerName" });
textControl.TextFields.Add(textField);

textField.Name = "TextField1";
if (!string.IsNullOrWhiteSpace(textField.Name))
{
    Console.WriteLine($"Name: {textField.Name}");
}

See Also

Text Fields and Hypertext Links - Identifiers and Names.