TX Text Control .NET for WPF

Migrating From .NET Framework to .NET

Topic

WPF applications that were built with TX Text Control on the .NET Framework 4.8 can run on .NET 8 or higher. Your XAML and code-behind that use the TextControl stay as they are: the move changes the project around them. The references to the installed assemblies give way to the NuGet package TXTextControl.TextControl.WPF.SDK, and licenses.licx gives way to the license file of the package. Follow the steps below to convert the project, switch the references and handle libraries.

What Changes

The move replaces the project template and project file, the TX Text Control references, the licensing, the source of the toolbox items and the way the application is deployed. What Differs Between the Two compares both kinds of project side by side. The XAML namespace mapping stays the same: xmlns:WPF="clr-namespace:TXTextControl.WPF;assembly=TXTextControl.WPF". See Assemblies and XAML Namespaces.

Before You Start

Convert the Project

.NET projects use SDK-style project files, so the project file has to be converted and its packages restored in the new format. Microsoft offers tools for this: the .NET Upgrade Assistant, which Microsoft now marks as deprecated, and the GitHub Copilot modernization agent that replaces it in Visual Studio 2026 and Visual Studio 2022 17.14.16 or later. Both handle WPF projects. See Upgrade Assistant overview on Microsoft Learn.

Whichever tool you use, select .NET 8 or higher as the target framework. The converted project file has a target framework such as net8.0-windows and <UseWPF>true</UseWPF>, as in the project file shown in .NET 8 or Higher.

The conversion doesn't turn the TX Text Control references into a package reference. That is the next step.

Replace the References With the Package

  1. Remove the references to the TX Text Control assemblies, such as TXTextControl.dll, TXTextControl.WPF.dll and TXTextControl.Server.dll, if they are still in the project.
  2. Choose Project > Manage NuGet Packages..., select Text Control Offline Packages as the package source and install TXTextControl.TextControl.WPF.SDK.
  3. In Solution Explorer, delete licenses.licx, which the WPF samples keep in the Properties folder.
  4. Rebuild the project.
  • Why licenses.licx goes. Its entries are read by the license compiler of the .NET Framework, which .NET 6 and later don't have. The package brings txtextcontrol.wpf.license instead, as Development Licenses explains.
  • The designer. With the package installed, the toolbox shows the TX Text Control items for the project, and the XAML designer works as before. See Visual Studio Toolbox and XAML Designer.

Installing and Updating Packages describes the package installation in detail.

Libraries and Test Projects

On the .NET Framework, the license was compiled into the executable. On .NET, a user control library or class library that contains the TextControl or ServerTextControl, and a test project that runs with NUnit or MSTest, has to name the assembly with the license through EntryAssembly before the first instance is created. User Controls and Class Libraries shows the code for both classes.

Publish the Application

A .NET application is deployed with Build > Publish Selection in Visual Studio. Select a folder and the target runtime, such as win-x64, and the publish process copies the TX Text Control assemblies and native libraries with your application. See Publishing .NET Applications.