TX Spell .NET for WPF

What's New in TX Spell .NET for WPF 4.0

Topic

Hyphenation came to TX Spell .NET for WPF with version 4.0: the spell checker splits words at their syllables, with Hunspell hyphenation lists for many languages. The version also checks text in a language you name, supports dictionaries of right-to-left languages and keeps dictionaries in less memory, so that more of them can be loaded at once.

Version 4.0 was released on November 20, 2013, together with TX Text Control X10 (version 20.0), as the blog article TX Text Control X10, TX Spell 4.0 and TX Barcode 3.0 Have Been Released announced. The version before it is Version 3.0, the next one Version 5.0.

Version 4.0 at a Glance

AreaWhat is new
HyphenationHyphenationList, HyphenationListCollection, GetHyphenationPoint and GetHyphenationPoints
Spell checkingCheck and CreateSuggestions for a given language
LanguagesDictionaries of right-to-left languages such as Arabic, Farsi, Hebrew and Urdu
MemoryLoaded dictionaries stored in a compressed form
LoadingDictionaries loaded asynchronously, LoadDictionaryDelayed

Hyphenation

A hyphenation list is a Hunspell file that says where the words of a language may be divided. TX Spell .NET 4.0 reads these lists and returns the positions at which a word can be hyphenated:

Without a language, both methods use the default hyphenation list. With a CultureInfo, they use a list of that language from HyphenationLists or from the default hyphenation lists folder.

You add a list to the HyphenationLists collection with Add, or name one of the default folder with HyphenationLanguage, which makes it the default list. Its default value is "(Auto)", and AvailableHyphenationLists names the lists found in the folder. The properties of a HyphenationList, such as MinCharsAtWordBegin, MinCharsAtWordEnd and HyphenateCapitalizedWords, set how the list divides words.

TX Text Control X10 uses these lists to hyphenate words at the end of a line when a spell checker is connected. Hyphenation Lists describes the lists and their settings, Hyphenation with TX Text Control the automatic hyphenation, and Hyphenating Text in Code the two methods.

Spell Checking in a Given Language

Check and CreateSuggestions gained overloads with a CultureInfo parameter. They check a text, or create suggestions for a word, with all dictionaries of that language: those in the dictionary collection and those in the default dictionary folder. Incorrect Words and Suggestions uses them.

Together with TX Text Control X10, the spell checker also chooses dictionaries by the language of the text at the input position: when the language changes from English to German, a German dictionary is used. The blog article Loading Dictionaries Dynamically in TX Spell .NET describes this, and Multilingual Documents and Language Scopes explains it for today's version.

Right-to-Left Languages

TX Spell .NET 4.0 supports dictionaries of languages written from right to left, such as Arabic, Farsi, Hebrew and Urdu. Right-to-Left Languages lists the dictionaries and shows how to check such text.

Memory and Loading

  • Compressed dictionaries. Loaded dictionaries are stored in memory in a compressed form, which reduces the memory TX Spell .NET needs. More dictionaries can be loaded at the same time, which matters when a document is checked and hyphenated in several languages.
  • Asynchronous loading. Dictionaries are loaded asynchronously, so the spell checker is initialized faster.
  • Checking while a dictionary loads. When LoadDictionaryDelayed is true, a dictionary added to the Dictionaries collection is loaded partially, and text can be checked before it is complete. Checking is slower until the dictionary is loaded. The default value is false. See Loading and Managing Dictionaries.

Dictionaries and Hyphenation Lists for Download

With the release, Text Control published 46 tested packages of dictionaries and hyphenation lists for commonly used languages. Each ZIP file holds one folder for the dictionary files and one for the hyphenation list, as the blog article TX Spell .NET 4.0: New Dictionaries and Hyphenation Lists Available described. Installing Dictionaries and Language Data covers the packages offered today.

Service Packs

The download package holds three service pack setups of version 4.0: TX Spell .NET for WPF 4.0 SP1.exe, dated December 11, 2013, TX Spell .NET for WPF 4.0 SP2.exe, dated March 7, 2014, and TX Spell .NET for WPF 4.0 SP3.exe, dated October 28, 2014. These are the dates of the setup files. Service Pack 2 was announced on March 10, 2014, in the blog article Service Pack 2 for TX Spell .NET 4.0 Released.

New Classes, Properties, Methods and Events

The classes and members below are the ones that the What's New documentation of version 4.0 lists for TX Spell .NET for WPF. Names are relative to the TXTextControl namespace, and each name links to its current reference page. The list names a Remove method of HyphenationListCollection, which the assemblies of version 11.0 don't have, so it has no link. The version's feature description names a TXSpellChecker.Hyphenation property for the default hyphenation list; that property is HyphenationLanguage.

New Classes

Members by Class

Next Steps