What's New in TX Spell .NET for WPF 7.0
A thesaurus is the main addition of TX Spell .NET for WPF 7.0: for a word or phrase, it returns synonyms grouped by meaning, read from thesaurus files. Alongside it, user dictionaries tell you which file they came from, and WPF applications require the .NET Framework 4.5.
Version 7.0 was released on December 13, 2017, together with TX Text Control X15. Service Pack 1 followed on May 28, 2019. The version after it is Version 8.0. The blog article TX Text Control X15 and TX Spell .NET 7.0 Released announced it.
Version 7.0 at a Glance
| Area | What is new |
|---|---|
| Thesaurus | CreateSynonyms and the classes SynonymGroup, Synonym, SynonymList and SynonymListCollection |
| User dictionaries | UserDictionary.FilePath |
| .NET | Compiled with the .NET Framework 4.0, WPF applications on the .NET Framework 4.5 or higher; Visual Studio 2017 |
Synonyms
CreateSynonyms of TXSpell, and CreateSynonyms of the WPF TXSpellChecker, return the synonyms of a word or phrase as an array of synonym groups. Each group holds synonyms that share one meaning:
| Class | Represents |
|---|---|
SynonymList | A thesaurus file, from which the synonyms are read |
SynonymListCollection | The synonym lists that CreateSynonyms uses |
SynonymGroup | Synonyms with a common meaning; Synonyms holds them, and its first entry also describes the meaning. PartOfSpeech describes the part of speech or meaning of the group |
Synonym | One synonym; Text is its name and optional additional information |
CreateSynonyms has three overloads, which take the synonyms from the added synonym lists, from the lists of a language or from one list you pass; Looking Up Synonyms in Code shows them. SynonymLanguage names the default synonym list, and AvailableSynonymLists lists all synonym lists of the default folder.
Version 7.0 also has a built-in dialog box for synonyms, which the proofing tab of TX Text Control's ribbon, RibbonProofingTab, opens when TX Spell .NET is connected to TX Text Control. Synonyms in the Context Menu shows the dialog.
User Dictionaries
A UserDictionary holds the words that users add to the dictionary of the language. Its new property FilePath returns the name and path of the file the user dictionary was loaded from or last saved to. When it was neither loaded from nor saved to a file, it returns null.
.NET Framework 4.5
TX Spell .NET for WPF 7.0 is compiled with the .NET Framework 4.0. From this version on, the WPF products of Text Control require the .NET Framework 4.5 or higher, so a WPF application that uses TX Spell .NET 7.0 targets version 4.5 or a later one. Version 7.0 was also tested with the final release of Visual Studio 2017: the setup, the toolbox, the help and IntelliSense.
New Classes and Members
Text Control's list of what version 7.0 added names four synonym classes and the UserDictionary class, with these members. All classes are in the namespace TXTextControl.Proofing, except TXSpellChecker, which is in TXTextControl.WPF.Proofing:
| Class | Properties | Methods |
|---|---|---|
Synonym | ID, the lowercase identifier of the synonym in its list; Name, the same identifier with its original case; Text | |
SynonymGroup | Language, PartOfSpeech, Synonyms | |
SynonymList | IsCreateSynonymsEnabled; IsSelectedAsDefault, whether SynonymLanguage selects the list as the default one; Language; Name | |
SynonymListCollection | Item | Add; GetItem, which finds a list by its name; Remove |
TXSpell, TXSpellChecker | AvailableSynonymLists, SynonymLanguage, SynonymLists | CreateSynonyms |
UserDictionary | FilePath; IsEditable, true by default | AddWord, RemoveWord, RemoveAllWords; Save, to a file or a string array; ToArray |
User dictionaries themselves are older than version 7.0: the events for words added to and removed from a user dictionary came with version 3.0. AddWord, RemoveWord and RemoveAllWords have no effect when IsEditable is false or when the user dictionary isn't added to the spell checker's dictionaries. User Dictionaries shows these members in use.
Next Steps
- Version 8.0: the version that followed.
- Version 6.0: the version before, and the Older Versions back to 3.0.
- Service Packs: Service Pack 1 of version 7.0.
- Breaking Changes: the change to the .NET Framework 4.5.
- API Reference: every class and member of TX Spell .NET for WPF.