TypeName Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Gets or sets the field's type name. For example for the type name of a Microsoft Word MergeField is MERGEFIELD. If the type name of the field is changed, its parameters must also be changed.
Syntax
public string TypeName { get; set; }Public Property TypeName As StringExamples
The following example inserts and configures a Word-compatible mail-merge field by using ApplicationField.TypeName.
textControl.Text = "Dear Customer";
textControl.InputPosition = new InputPosition(5);
ApplicationField applicationField = new(ApplicationFieldFormat.MSWord, "MERGEFIELD", "Customer", new[] { "CustomerName" });
textControl.ApplicationFields.Add(applicationField);
applicationField.TypeName = "MERGEFIELD";
if (!string.IsNullOrWhiteSpace(applicationField.TypeName))
{
Console.WriteLine($"Type Name: {applicationField.TypeName}");
}textControl.Text = "Dear Customer"
textControl.InputPosition = New InputPosition(5)
Dim applicationField As New ApplicationField(ApplicationFieldFormat.MSWord, "MERGEFIELD", "Customer", New String() { "CustomerName" })
textControl.ApplicationFields.Add(applicationField)
applicationField.TypeName = "MERGEFIELD"
If Not String.IsNullOrWhiteSpace(applicationField.TypeName) Then
Console.WriteLine($"Type Name: {applicationField.TypeName}")
End If