TX Text Control .NET for WPF

Upgrading From Previous Versions

Topic

Moving a WPF project from TX Text Control 32.0 or 33.0 to version 34.0 is mostly a change of references: each major version has its own assemblies, its own package versions and its own toolbox category, and can be installed next to the earlier ones. How much you change depends on the project's target. A .NET Framework project gets new assembly references and new licenses.licx entries, and a .NET project a new package version. The steps for both follow.

Service Pack or Major Version

  • A service pack, such as Service Pack 5 of version 34.0, updates the version you already use. The latest full setup updates the installation in place, and in .NET projects you update the package. See Installing the Product and Installing and Updating Packages.
  • A major version, such as 34.0 after 33.0, is what this page covers.

Before You Start

  • Check your subscription. New major versions are included while your subscription is active. Versions you received during the subscription stay licensed after it ends; versions released afterward need a renewal. See Licensing Overview.
  • Install version 34.0. Download the setup TX Text Control.NET for WPF 34.0 with SP5.exe and install it, as described in Installing the Product.
  • Read the breaking changes of every version between yours and 34.0 in Breaking Changes.

Upgrade a .NET Framework Project

A project created with WPF App (.NET Framework) references the TX Text Control assemblies of one version, such as TXTextControl.dll and TXTextControl.WPF.dll, and names their version in licenses.licx.

If you uninstall the earlier version before you install version 34.0, Visual Studio adapts the project to the new version when you open it. If several versions stay installed, change the project yourself:

  1. Open the project in Visual Studio.
  2. Remove the references to the TX Text Control assemblies of the earlier version.
  3. Add references to the same assemblies of version 34.0 from the Assembly folder of the new installation.
  4. Open licenses.licx, in the WPF samples Properties\licenses.licx, and change the version in each entry to the version of the new assemblies.
  5. Close Visual Studio, open the project again and choose Build > Rebuild Solution.

Warning

Old Versions in licenses.licx. When an entry still names the earlier version, the license of that version can be used, and the controls can't be licensed. Take the new version from the properties of the new references. .NET Framework: licenses.licx shows an entry and explains the file.

Upgrade a .NET Project

A project for .NET 8 or higher references a version of TXTextControl.TextControl.WPF.SDK. The versions 34.0.0 to 34.0.5 belong to version 34.0, and 33.0.0 to 33.0.3 to version 33.0.

  1. Install the setup of version 34.0. It adds the 34.0 package versions to Text Control Offline Packages. The private feed offers them to developers whose serial number covers version 34.0.

  2. In Manage NuGet Packages, update TXTextControl.TextControl.WPF.SDK to 34.0.5, or run:

    dotnet add package TXTextControl.TextControl.WPF.SDK --version 34.0.5
    
  3. Rebuild the project.

  • From version 32.0, change the target framework to net8.0-windows or higher before you update the package. Coming from 32.0 before Service Pack 2, also delete licenses.licx if the project still contains it. Version 33.0 and Version 32.0 in Breaking Changes explain both changes.
  • The license is part of the new package, so nothing else in the project changes for licensing.
  • The toolbox shows the items of the new package in the category TX Text Control 34.0.

Check the Result

Run the application and check the version it uses, as Check the Installed Service Pack shows. Then test the output your application creates, especially PDF files, which version 34.0 saves with tags. Breaking Changes lists what to look at.

Coming From TX Text Control ActiveX

An application built with TX Text Control ActiveX isn't upgraded but ported: its code is rewritten against the .NET classes. Text Control documents this port for Windows Forms, and Migrating from ActiveX in the Windows Forms documentation maps every ActiveX property, method and event to its .NET counterpart. Most of the mapping applies to WPF as well:

  • Shared classes. The classes of the TXTextControl namespace that the tables name, such as Selection, ParagraphFormat and the collections of tables, images, fields and sections, exist in WPF with the same members.
  • The control. The members of the Windows Forms TextControl that the tables name are members of WPF.TextControl with the same name, except seven: AllowUndo, BackColor, BorderStyle, ForeColor, ScrollBars, TextBackColor and Zoomed.
  • Inherited members. The tables show members such as Click, Font and Handle of the Windows Forms class Control without a link. WPF.TextControl derives from System.Windows.Controls.Control instead, so these members follow the WPF API.
  • The tool bars. The ActiveX tool bars correspond to WPF.ButtonBar, WPF.RulerBar and WPF.StatusBar, which you connect by name in XAML, as XAML Integration shows. The ruler bar and status bar members of the tool bar tables, such as ScaleUnit and PageText, exist in WPF. The button bar members BorderStyle, ButtonOffsets, ButtonPositions, ButtonSeparators and ButtonStyle don't: WPF.ButtonBar is a WPF ToolBar.