TX Text Control .NET for WPF

What's New in TX Text Control .NET for WPF 31.0

Topic

Signature fields, which mark where a document is signed, arrived in TX Text Control .NET for WPF with version 31.0. So did NuGet packages and licensing for .NET 5, .NET 6 and .NET 7, which made the version the first to support modern .NET the way the .NET Framework had been. Developers who maintain an application on 31.0, or who plan a step up from it, get its additions over version 30.0 in full, down to the events a handler can react to.

Version 31.0 was released on September 7, 2022, together with TX Text Control .NET Server, TX Text Control .NET for Windows Forms, TX Text Control ActiveX and TX Spell .NET 10.0. The current version is Version 34.0. The service packs of 31.0 are listed on Service Packs.

Version 31.0 at a Glance

AreaWhat is new
SignaturesSignature fields that hold a signature image and can be signed with a certificate in PDF documents
Dialog boxesA Save As dialog box with options, a form field dialog box and a signature field layout dialog box
Mail mergeCultures for parsing the data and formatting the result, merge settings for DataSourceManager
.NET.NET 5, .NET 6 and .NET 7, NuGet packages, licensing for .NET
SamplesTX Words split into individual samples, each explained in a sidebar

Signature Fields

A signature field is a frame in the document that holds the image of a signature. You add the image when you design the document or later, when the document is signed. In a PDF document, a named signature field can also be associated with a digital certificate.

  • Position. Like an image or a text frame, a signature field is positioned as a single character in the text or at a geometric position. A geometric position is relative to the paragraph the field is anchored to, to a page or to the whole document. One overload of SignatureFieldCollection.Add lets the user draw the field with the mouse.
  • Signer data. SignatureField.SignerData stores data about the person who is expected to sign: name, title, address, contact information and the reason for signing.
  • Certificates. When you save a PDF or PDF/A document, SaveSettings.SignatureFields takes an array of DigitalSignature objects. Each one associates an X.509 certificate with the signature field of the same name. A PDF document with unsigned signature fields can be signed in Acrobat Reader later.
  • File formats. Signature fields are saved in the TX Text Control format, PDF, DOCX and RTF. All other formats save only the signature image.

The API and the User Interface

Signature Fields shows how to insert signature fields in the ribbon and in code and how to handle their events, Signature Fields and Signature Appearance how to sign them and Digitally Sign a PDF takes you through a first signature. The blog article Sneak Peek 31.0: Signature Fields shows the fields in the user interface.

Built-In Dialog Boxes and Form Fields

  • Save As options. A new overload of TextControl.Save opens the built-in Save As dialog box with additional options. Its last parameter takes one or more values of SaveSettings.DialogSettings: EnterPassword adds a button to set a password for a PDF document, StylesheetOptions lets the user save the CSS of an HTML document inline or in a separate file, and SaveSelection adds a check box to save only the selected text.
  • Preselected format. LoadSaveSettingsBase.DefaultStreamType sets the format that the open and Save As dialog boxes preselect.
  • Form field dialog box. FormField.FormFieldDialog opens a built-in dialog box for the attributes of a form field, such as its name, its ID and the items of a drop-down field.
  • Form field changes. TextControl.FormFieldSettingsChanged occurs when the name, the ID or the formatting of a form field has changed. It passes a FormFieldEventArgs object with the form field.

Built-in Dialog Boxes lists the dialog boxes, and Form Fields and Conditional Instructions covers form fields.

Mail Merge Cultures

The number and date formats of the data can differ from the formats the merged document should show. Version 31.0 lets you set a culture for each side.

Merge Fields in Getting Started merges data into a template.

DataSourceManager

DataSourceManager handles the data sources of a mail merge. In version 31.0, it received:

Samples

Version 31.0 revised the TX Words sample and split it into individual samples, which are easier to follow one at a time. Each sample shows a Sidebar at run time that explains the project. Its ContentLayout is About, a panel with a TextControl for the explanation, which TXITEM_AboutViewer of Sidebar.AboutItem identifies. TX Words describes the samples, and Sidebar the panels of the sidebar.

.NET and Packages

  • .NET versions. Version 31.0 supports .NET 5, .NET 6 and .NET 7, which was a preview at the time of the release, besides the .NET Framework. Text Control announced support for the final release of .NET 7 in November 2022; see the blog article .NET 7 Day 0 Support for all .NET Products of Text Control.
  • Licensing for .NET. The licensing of version 31.0 is compatible with .NET 5, .NET 6 and .NET 7, and the NuGet packages add the license to a project.
  • Text Control Offline Packages. The setup adds a NuGet package source named Text Control Offline Packages that contains the NuGet packages of the Text Control components. The packages configure the references and the license automatically, add their controls to the toolbox and support the Publish command of Visual Studio. See Configuring Package Sources.
  • Licensing without BinaryFormatter. In version 30.0, compiling the license into a .NET assembly required the obsolete .NET BinaryFormatter to be enabled. Version 31.0 no longer requires it.

The blog article Visual Studio 2022 and .NET 5, 6 and 7 (Preview) Support and Strategy explains the changes.

New Classes and Members

The What's New documentation of version 31.0 lists these classes, properties, methods and events as new in TX Text Control .NET for WPF, grouped by class. Each name leads to its reference page. The On methods, such as OnSignatureFieldCreated, are protected methods that raise the event of the same name.

Upgrade to Version 31.0

The What's New documentation of version 31.0 lists no changes to existing classes, properties, methods or events, and the version has no change that requires work; projects that reference the assemblies directly can move to the NuGet packages. Breaking Changes names the versions that have changes, and Upgrading from Previous Versions and Migrating from .NET Framework to .NET cover the move of a project.

Next Steps