XAML Namespaces and Assembly References
XAML finds the controls of TX Text Control through a namespace declaration that maps a prefix, such as WPF, to the namespace TXTextControl.WPF in the assembly TXTextControl.WPF. When the declaration is missing, the prefix doesn't match, or the project references the assemblies of another version, the XAML of the window doesn't compile or the designer shows errors. Assemblies and XAML Namespaces lists the namespaces and assemblies.
The Controls Aren't Recognized in XAML
The XAML of a window uses WPF:TextControl or another control of TX Text Control, and the XAML doesn't compile, or the designer doesn't know the element.
The window has no namespace declaration for the prefix, or the prefix of the declaration differs from the prefix of the elements. When you add a control from the toolbox, Visual Studio adds the declaration to the Window element; when you write the XAML yourself, you add it.
Add the declaration to the
Windowelement:xmlns:WPF="clr-namespace:TXTextControl.WPF;assembly=TXTextControl.WPF"Use the same prefix for every element of TX Text Control, such as
<WPF:TextControl />. The prefix is your choice: the samples useWPFormy, the reference usestx, but one window must use the one it declares.Build the project, so that the designer loads the assembly.
Add TextControl in XAML shows a complete window.
The Reference to TXTextControl.WPF Is Missing
The namespace is declared, but the assembly TXTextControl.WPF can't be found.
In a .NET project, the references come from the package TXTextControl.TextControl.WPF.SDK, which contains the assemblies of the controls and the engine. In a .NET Framework project, you reference the assemblies of the setup, and Visual Studio adds the reference to TXTextControl.WPF when you add the first control from the toolbox.
- In a .NET project, install
TXTextControl.TextControl.WPF.SDK, as Installation and Package Restore describes. - In a .NET Framework project, add references to TXTextControl.dll and TXTextControl.WPF.dll from the Assembly folder of the TX Text Control installation.
- When Visual Studio asks to restart the XAML Designer, confirm it, as Toolbox and XAML Designer describes.
The Project References the Assemblies of an Earlier Version
A .NET Framework project, for example a sample from GitHub, doesn't build, or it references assemblies in a folder that doesn't exist on your machine.
The project references the assemblies of the version it was written for, sometimes with a path to an installation directory on another machine.
- Remove the references to TXTextControl.dll and TXTextControl.WPF.dll.
- Add them again from the Assembly folder of your installation.
- In licenses.licx, change the version in each entry to the version of the new assemblies, and rebuild the project.
Update an Older Sample describes the changes for the samples on GitHub, and Upgrading from Previous Versions for your own projects.