What's New in TX Spell .NET for WPF 10.0
Better suggestions for words typed without their accents or umlauts, and names of your choosing for the dictionaries in the dialog boxes: these are the two changes to spell checking that TX Spell .NET for WPF 10.0 brought. It was also the first version installed from a NuGet package, and it supported .NET 5, .NET 6 and .NET 7.
Version 10.0 was released on September 7, 2022, together with TX Text Control 31.0. Service Pack 1 followed on February 22, 2023. The version after it is Version 11.0. The blog article TX Text Control 31.0 and TX Spell .NET 10.0 Have Been Released announced it.
Version 10.0 at a Glance
| Area | What is new |
|---|---|
| Suggestions | The Hunspell REP flag of a dictionary is used to create suggestions |
| Dialog boxes | Dictionary.DisplayName and SynonymList.DisplayName |
| .NET | .NET 5, .NET 6 and .NET 7 applications; .NET 6 and .NET 7 in Visual Studio 2022 |
| Packages | A NuGet package in the package source "Text Control Offline Packages" |
Suggestions From the REP Flag
The REP flag in the affix file of many Hunspell dictionaries lists character sequences that writers commonly confuse. Since version 10.0, CreateSuggestions applies these replacements, which helps with missing diacritical marks, umlauts written out and spelling by sound. Text Control gives fone with the suggestion phone as an example, and for German, Moglichkeit and Moeglichkeit, both with the suggestion Möglichkeit. The suggestions improve only with dictionaries whose affix file contains the flag; How TX Spell .NET Uses the Affix Rules describes the rules.
Display Names for Dictionaries and Synonym Lists
The dialog boxes show the name of each dictionary, which is often a file name such as en_US. The new property DisplayName of Dictionary, the base class of all dictionaries, sets the text that the options dialog and the Suggestions Dictionary list of the spell check dialog show instead, and DisplayName of SynonymList does the same for a synonym list in the options dialog. By default, a display name is the value of Name. Hide or Rename a Dictionary shows the property in code.
A NuGet Package and .NET 5 to .NET 7
Version 10.0 made TX Spell .NET for WPF available as a NuGet package. The setup adds the package source Text Control Offline Packages to NuGet, and the package configures a project with its references and license, updates it through the NuGet package manager and supports publishing the application. Version 10.0 is compatible with .NET 5, .NET 6 and .NET 7, and in Visual Studio 2022 you create WPF applications for .NET 6 and .NET 7 with it.
The packages of version 11.0 require .NET 8 or higher; Version 11.0 lists them.
New Classes and Members
Text Control's list of what version 10.0 added names the abstract class Dictionary of the namespace TXTextControl.Proofing, the base class of all dictionaries, and these properties:
| Class | Property | What it does |
|---|---|---|
Dictionary | DictionaryEncoding | Gets or sets the encoding of the dictionary |
Dictionary | DisplayName | The name the dialog boxes show, described above |
Dictionary | IsGetSuggestionsEnabled | Whether suggestions are created from the dictionary |
Dictionary | IsSelectedAsDefault | Whether the Language property of the spell checker selects the dictionary as the default one |
Dictionary | IsSpellCheckingEnabled | Whether the dictionary is used to check spelling |
Dictionary | Name | Gets or sets the name of the dictionary |
SynonymList | DisplayName | The name the options dialog shows, described above |
The class itself is older than version 10.0: the lists of version 3.0 and version 8.0 already name its properties Language and ShowInOptionsDialog. Only the two DisplayName properties are marked as introduced in 10.0 in the reference. Loading and Managing Dictionaries shows IsSpellCheckingEnabled and IsGetSuggestionsEnabled in use.
Next Steps
- Version 11.0: the current version and its packages.
- Service Packs: Service Pack 1 of version 10.0.
- Breaking Changes: the effect of the REP flag on the suggestions of an existing application.
- Version 9.0: the features of the previous version.