New Features

TX Text Control 31.0 provides the following new features:

Support for .NET 5 and Better

With the release of .NET Core 3.0 and later versions of .NET, Windows Forms and WPF got modernized and can be used with modern .NET versions and is no longer bound to the .NET Framework. In this context, TX Text Control 31.0 now fully supports .NET 5, 6 and 7 (Preview). That includes the usage of NuGet packages for ASP.NET., Windows Forms and WPF, a Visual Studio design-time support in Windows Forms, Visual Studio Toolbox support, .NET 5, 6 and 7 compatible licensing and an easy deployment.

Signature Fields

TX Text Control now supports signature fields which can be associated with a digital certificate. A signature field can be positioned such as an image or textframe, either geometrically or as a single character. Geometrically, its position can either be relative to a paragraph to which it is anchored or relative to the complete document. The new SignatureField class handles the positioning of the signature field in the document. A signature field acts as a site for a signature image. Such an image can be added, when the document is designed or later when it is digitally signed, using the signature field's Image property. When the document is saved as a .pdf document, each signature field can be associated with a digital certificate using the SaveSettings.SignatureFields property. To associate the certificate a signature field must have a name. It can be specified through the field's constructor or its Name property. Additionally, a signature field can store data of an suggested signer which can be set with the SignatureField.SignerData property. All signature fields in a document are contained in a SignatureFieldCollection. The collection can also be used to add or remove signature fields. It can be obtained through the TextControl.SignatureFields, WPF.TextControl.SignatureFields or ServerTextControl.SignatureFields property. The TextControl.SignatureFieldLayoutDialog and WPF.TextControl.SignatureFieldLayoutDialog methods opens a dialog box, which offers layout settings such as positioning, size and text distances and image saving options, when a signature image exists. A signature field can be saved with the TX Text Control format and the .PDF, .DOCX und .RTF formats. With all other formats the signature image is saved. Events occur, when a signature field is created (SignatureFieldCreated), deleted (SignatureFieldDeleted), selected (SignatureFieldSelected) or deselected (SignatureFieldDeselected).

Built-in Dialogboxes

TextControl supports now a built-in Save As... dialogbox showing additional saving options. A new overlaod of the TextControl.Save and WPF.TextControl.Save methods with a parameter of the type SaveSettings.DialogSettings can be used to open this dialogbox. The new LoadSaveSettingsBase.DefaultStreamType property determines the selected file format filter, when the file Open... and file Save As... dialogboxes are opened.

Mail Merge and Reporting

The MailMerge class and various supporting classes now provide the possibility to set data source and merge target cultures. This is useful in case the number and date formats in a data source differ from the desired format of the merge result, for example. To set the culture for the data source and merge target, use the MergeCulture and DataSourceCulture properties of the MailMerge class. Some of the merge field adapter classes also gained new properties for the same purpose (see MergeField.DataSourceCulture and MergeField.MergeCulture, for example).

HTML5 Document Editor Programming

The context menu of the HTML5 document editor is now fully customizable. To access the context menu contents, use the new "contextMenuOpening" event of the TXTextControl object (see TXTextControl.addEventListener). The event provides the context menu contents via the ContextMenuEventArgs object. The event handler can then modify the contents of the context menu before it is displayed.

Form Fields

TextControl supports different types of form fields. To manage the default settings of a specific form field, the FormField.FormFieldDialog method is implemented that opens a built-in dialogbox. The new FormFieldSettingsChanged event occurs, when a formatting attribute has been changed.