TX Spell .NET for Windows Forms

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

Topic

Version 6.0 of TX Spell .NET for Windows Forms lets you build a spelling correction user interface of your own without handling a single event: the new SpellingCorrectionUIProvider runs the correction and your controls bind to its values. The change events of the spell check dialog and the context menu can also be canceled from this version on.

Version 6.0 was released on April 15, 2015, together with TX Text Control X12 (version 22.0), as the blog article TX Text Control X12 and TX Spell 6.0 Released announced. It stayed the current version until Version 7.0 in December 2017. The features below are the ones added since Version 5.0.

Version 6.0 at a Glance

AreaWhat is new
Correction user interfacesSpellingCorrectionUIProvider with five handlers for the correction, the suggestions, the suggestion dictionaries, the preview and the state
EventsA Cancel property for the events that change an incorrect or misspelled word
Service packsService Pack 1 in February 2017 and Service Pack 2 in June 2017

SpellingCorrectionUIProvider

Before version 6.0, a correction user interface of your own had to follow the spell checker through its events. The SpellingCorrectionUIProvider keeps the whole workflow instead: it knows the word to correct, creates its suggestions and decides which commands are possible at the moment. Its objects report every change, so a list box, a text box or a button bound to them updates by itself. TXSpellChecker and TXSpell return the provider in their SpellingCorrectionUIProvider property.

The provider divides the work among five nested classes, each returned by a property whose name ends in -Handling or -Managing:

  • CorrectionHandler. The commands of a correction: Change, ChangeAll, Delete, Ignore, IgnoreAll and AddToDictionary, which adds the word to the editable user dictionaries of its language. A property such as IsChangeEnabled tells whether a command is possible, so a button can bind its Enabled state to it. CheckCorrectedWord tells whether a word typed by the user is in the selected suggestion dictionaries.
  • SuggestionsHandler. Suggestions holds the suggestions for the current word, created from the selected suggestion dictionaries. MaxSuggestions limits their number, and IsNoSuggestionsItemEnabled adds a message to the list when there are none.
  • SuggestionDictionariesHandler. SuggestionDictionaries holds the dictionaries of the current word's language, and SelectedSuggestionDictionaries the ones the suggestions come from.
  • PreviewHandler. PreviewSentenceBounds returns the start and the length of the sentence that contains the current word, for a preview of that sentence.
  • StateManager. SetCurrent connects a TextControl or a text, and Cancel returns the provider to its initial state. Mode returns the state of the correction, and properties such as CurrentWordToCorrect and CurrentTextControl return what is being corrected.

Spelling Correction Modes and UI Provider explains the modes and builds a data-bound correction panel with the provider.

Cancel a Change

When the user changes an incorrect or misspelled word in the spell check dialog or the context menu, the spell checker raises IncorrectWordChanging for a text or MisspelledWordChanging for a TextControl. From version 6.0 on, IncorrectWordChangingEventArgs.Cancel and MisspelledWordChangingEventArgs.Cancel stop that change when an event handler sets them to true. Events shows both events.

Service Packs

Service packReleasedSetup
Service Pack 1February 1, 2017TX Spell .NET for Windows Forms 6.0 SP1.exe
Service Pack 2June 14, 2017TX Spell .NET for Windows Forms 6.0 SP2.exe

Both service packs were released together with the service packs of TX Text Control X14, and the blog articles Service Pack 1 for TX Text Control X14 and TX Spell .NET 6.0 Released and Service Pack 2 for TX Text Control X14 and TX Spell .NET 6.0 Released announced them. The service pack setups of the download package are dated November 23, 2016, and June 12, 2017, some time before the announcements. The full installer of version 6.0, TX Spell .NET for Windows Forms 6.0.exe, carries the date of Service Pack 2.

New Classes, Properties, Methods and Events

These are the classes and members that the What's New documentation of version 6.0 lists. All names are relative to the TXTextControl.Proofing namespace, and each links to its current reference page.

New Classes

Members by Class

Next Steps