What's New in TX Text Control .NET for WPF 33.0
For a WPF project, version 33.0 is mainly a platform release: its NuGet package requires .NET 8 or higher, and Text Control prepared it for .NET 9 and the preview of .NET 10. The API gained classes that read the files embedded in a PDF document, classes that produce barcodes and drawings as SVG, and mail merge events that tell which subtext part a merged element belongs to.
Version 33.0 was released on March 12, 2025, together with TX Text Control .NET Server, TX Text Control .NET for Windows Forms and TX Spell .NET 11.0. The current version is Version 34.0, and the service packs of 33.0 are listed on Service Packs.
Version 33.0 at a Glance
| Area | What is new |
|---|---|
| .NET | A package for .NET 8 and higher, support for .NET 9, tests with the preview of .NET 10 |
| Extracting the embedded files of a PDF document | |
| Barcodes and drawings | TXBarcodeCore and TXDrawingCore, which provide barcodes and shapes as SVG |
| Mail merge | Subtext part information in the arguments of five merge events |
.NET 8, .NET 9 and .NET 10
- .NET 8 and higher. The package
TXTextControl.TextControl.WPF.SDKtargets .NET 8, so a project that uses it targets .NET 8 or higher. The 32.0 packages targeted .NET 5 and, from Service Pack 2, .NET 6. Text Control continues to provide assemblies for the .NET Framework 4.8 through the setup. - .NET 9. Version 33.0 supports WPF applications on .NET 8 and .NET 9, created in Visual Studio 2022. Text Control names licensing and NuGet support among the parts adapted to .NET 9.
- .NET 10 preview. Text Control prepared version 33.0 for the preview of .NET 10. Final support for .NET 10 came with Version 34.0.
.NET and .NET Framework lists the current requirements.
Windows Only
The release of version 33.0 brought TX Text Control .NET Server to Linux with a new engine. That engine is part of the .NET Server product and its license. The package of TX Text Control .NET for WPF contains native libraries for 32-bit and 64-bit Windows only, and WPF applications run on Windows, as before. Supported Platforms lists the platforms of the current version.
PDF Attachments
A PDF document can contain embedded files, for example the XML data of an electronic invoice. The new static class DocumentServer.PDF.Attachments extracts them without loading the PDF document into a TextControl or a ServerTextControl:
- GetFromFile returns the embedded files of a PDF file, and GetFromData those of a PDF document in a byte array.
- Each file is a DocumentServer.PDF.EmbeddedFile object with the file name, the description, the MIME type, the creation and modification dates and the data, as text or as binary data. For PDF/A documents, Relationship describes how the file relates to the document, for example
SourceorData.
Pdf.EmbeddedFile is written with an alias, such as using Pdf = TXTextControl.DocumentServer.PDF;, because TXTextControl.EmbeddedFile has the same name. Extract Attachments From a PDF shows the code that saves the attachments of a PDF file to a folder.
Barcodes and Drawings
- TXBarcodeCore. Barcode.TXBarcodeCore specifies the type and format of a barcode and returns it as an SVG string with GetSVG. Static methods such as IsTextValid check a text for a barcode type before you set it.
- TXDrawingCore. Drawing.TXDrawingCore manages shapes, a selection, an undo buffer and the clipboard, and returns the shapes as an SVG string with GetSVG.
Both classes have no user interface. The WPF barcode control TXBarcodeControl remains, and version 33.0 removed four of its overloads; see Upgrade to Version 33.0. Create a Barcode as SVG With TXBarcodeCore shows the barcode class in code, and Work With the Shapes of a Drawing the drawing class.
Mail Merge
MailMerge raises events while it merges a template. A SubTextPart is a user-defined part of a document. In version 33.0, the arguments of five events tell which subtext part the merged element belongs to, with the properties SubTextPartID and SubTextPartNumber:
| Event arguments | The subtext part |
|---|---|
| BlockMergingEventArgs | That represents the merge block |
| BlockRowMergedEventArgs | That represents the merge block |
| FieldMergedEventArgs | That contains the field, or 0 |
| FormFieldMergedEventArgs | That contains the form field, or 0 |
| ImageMergedEventArgs | That contains the image, or 0 |
SubTextPartID is the ID of the subtext part, and SubTextPartNumber its one-based number. Merge Events covers the events, and Subtext Parts the parts themselves.
New Classes and Members
The What's New documentation of version 33.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.
- Barcode.TXBarcodeCore (new class): AdditionalText, Alignment, Angle, BackColor, BarcodeType, BarcodeTypeSettings, Create, ForeColor, GetDefaultText, GetMaximumTextLength, GetMinimumTextLength, GetSVG, IsTextValid, Load, Save, ShowText, Size, Text, TextAlignment, UpperTextLength, ViewChanged
- DocumentServer.MailMerge.BlockMergingEventArgs: SubTextPartID, SubTextPartNumber
- DocumentServer.MailMerge.BlockRowMergedEventArgs: SubTextPartID, SubTextPartNumber
- DocumentServer.MailMerge.FieldMergedEventArgs: SubTextPartID, SubTextPartNumber
- DocumentServer.MailMerge.FormFieldMergedEventArgs: SubTextPartID, SubTextPartNumber
- DocumentServer.MailMerge.ImageMergedEventArgs: SubTextPartID, SubTextPartNumber
- DocumentServer.PDF.Attachments (new class): GetFromData, GetFromFile
- DocumentServer.PDF.EmbeddedFile (new class): BinaryData, CreationDate, Description, FileName, HasBinaryData, HasStringData, LastModificationDate, MimeType, Relationship, StringData
- Drawing.TXDrawingCore (new class): AdaptBounds, BackColor, BorderColor, BorderWidth, CanCopy, CanPaste, CanRedo, CanUndo, Changed, ClearUndo, Copy, Cut, GetSVG, IsCanvasVisible, Load, Paste, Redo, Save, SelectAll, Selection, ShapeCreated, ShapeDeselected, ShapeFlipped, ShapeFormatChanged, ShapeMoved, Shapes, ShapeSelected, ShapeSized, Size, SizeToContent, Undo, ViewChanged
Upgrade to Version 33.0
The package requires .NET 8 or higher, the SerializationFormat overloads of TXBarcodeControl.Load and TXBarcodeControl.Save were removed, and some files of the package have new names. The toolbox items are unchanged, in the tab TX Text Control 33.0. Breaking Changes in the Upgrade Guide describes what to change, and Upgrading from Previous Versions has the steps.
Next Steps
- Version 34.0: the features of the next version.
- Version 32.0: the features of the previous version.
- Breaking Changes: the changes that can require work when you upgrade.
- The Wait is Over: TX Text Control for Linux is Officially Here: the release announcement on the Text Control Blog, which covers all products of version 33.0.