TX Spell .NET for Windows Forms

What's New in TX Spell .NET for Windows Forms 10.0

Topic

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 Windows Forms 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

AreaWhat is new
SuggestionsThe Hunspell REP flag of a dictionary is used to create suggestions
DictionariesThe abstract base class Dictionary of all dictionaries, with DictionaryEncoding, IsGetSuggestionsEnabled, IsSelectedAsDefault, IsSpellCheckingEnabled and Name
Dialog boxesDictionary.DisplayName and SynonymList.DisplayName
.NET.NET 5, .NET 6 and .NET 7 applications; .NET 6 and .NET 7 in Visual Studio 2022
PackagesA NuGet package in the package source "Text Control Offline Packages"

Suggestions From the REP Flag

TX Spell .NET checks text against Hunspell dictionaries, represented by the class OpenOfficeDictionary. A Hunspell dictionary is a pair of files: the word list (.dic) and the affix file (.aff), which holds the rules of the language. The REP flag in the affix file of many dictionaries lists replacements: character sequences that writers commonly confuse, and what they should be.

Since version 10.0, CreateSuggestions of TXSpell applies these replacements when it creates the suggestions for a misspelled word. This helps with three kinds of mistakes:

  • Missing diacritical marks, such as an a typed instead of an ä.
  • Umlauts written out, such as ue typed instead of ü.
  • Spelling by sound, such as f typed instead of ph.

Text Control gives fone with the suggestion phone as an example, and for German, Moglichkeit and Moeglichkeit, both with the suggestion Möglichkeit. The flag is part of the dictionary, so the suggestions improve only with dictionaries whose affix file contains it.

In TX Text Control Words, the context menu of Fone offers Phone first:

The context menu of the misspelled word "Fone" in TX Text Control Words, with the suggestions Phone, Phones, Phoned, Phony and IPhone.

Display Names for Dictionaries and Synonym Lists

The options dialog, which OptionsDialog opens, lists the loaded dictionaries and synonym lists. The SpellCheckDialog offers the dictionaries in its SuggestionDictionaryComboBox. Both 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 these dialog boxes show instead. DisplayName of SynonymList does the same for a synonym list in the options dialog. By default, a display name is the value of Dictionary.Name or SynonymList.Name.

The spell check dialog of TX Text Control Words lists a dictionary under its display name:

The Spelling dialog over TX Text Control Words with the Suggestions Dictionary list open, offering en_US.dic and Shared Medical Dictionary.

Hide or Rename a Dictionary sets a display name in code.

The Dictionary Base Class

The member list of version 10.0 names the abstract class Dictionary, the base class of every kind of dictionary, as a new class. Besides DisplayName, these of its properties are listed as new:

PropertyDoes
DictionaryEncodingGets or sets the encoding of the dictionary
IsGetSuggestionsEnabledSays whether the dictionary is used to create suggestions
IsSelectedAsDefaultSays whether the Language property selected the dictionary as the default dictionary
IsSpellCheckingEnabledSays whether the dictionary is used for spell checking
NameGets or sets the name of the dictionary

Loading and Managing Dictionaries explains how these properties are used.

A NuGet Package and .NET 5 to .NET 7

Version 10.0 made TX Spell .NET for Windows Forms 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 Windows Forms 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.

Next Steps