TX Spell .NET for WPF

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

Topic

Before version 6.0, a spell checking interface of your own meant handling events and keeping track of the correction yourself. TX Spell .NET for WPF 6.0 moved that work into the spell checker: the SpellingCorrectionUIProvider runs the correction, and your controls bind to its values.

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 remained the current version of TX Spell .NET until Version 7.0 followed in December 2017. The version before it is Version 5.0.

Version 6.0 at a Glance

AreaWhat is new
Correction interfacesSpellingCorrectionUIProvider and its handler classes, for correction interfaces built with data binding
EventsCancel on the event arguments of IncorrectWordChanging and MisspelledWordChanging

The Spelling Correction UI Provider

The SpellingCorrectionUIProvider property of TXSpellChecker, and the property of the same name of TXSpell, returns an object that works through the misspelled words of a text or a TextControl and holds everything a correction interface shows: the word to correct, its suggestions and the commands that apply to it. Its values change as the correction goes on, and controls bound to them update without event handlers of yours.

The provider splits the work among objects of nested classes, each returned by one of its properties:

PropertyReturnsWhat it does
StateManagingStateManagerHolds the state of the correction. SetCurrent connects a TextControl or a text, Cancel ends the correction, and Mode returns the current state as a TXSpell.SpellingCorrectionMode value
CorrectionHandlingCorrectionHandlerRuns the commands Change, ChangeAll, Ignore, IgnoreAll, Delete and AddToDictionary, and tells with properties such as IsChangeEnabled whether each one is available
SuggestionsHandlingSuggestionsHandlerHolds the Suggestions for the current word and their maximum number
SuggestionDictionariesHandlingSuggestionDictionariesHandlerHolds the dictionaries the suggestions come from
PreviewHandlingPreviewHandlerReturns with PreviewSentenceBounds the start and length of the sentence that contains the current word, for a preview

With these objects, you can rebuild the spell check dialog in a design of your own, or place a correction panel beside the editor. Spelling Correction Modes and UI Provider explains the modes and builds such a panel in XAML, and Suggestion Controls binds a list of suggestions to the provider.

Canceling a Change

The event arguments of IncorrectWordChanging and MisspelledWordChanging gained a Cancel property: IncorrectWordChangingEventArgs.Cancel and MisspelledWordChangingEventArgs.Cancel. Set it to true to stop the change of the current word. Events shows how.

Service Packs

  • Service Pack 1 was released on February 1, 2017, together with Service Pack 1 of TX Text Control X14, as the blog article Service Pack 1 for TX Text Control X14 and TX Spell .NET 6.0 Released announced.
  • Service Pack 2 was released on June 14, 2017, together with Service Pack 2 of TX Text Control X14, as the blog article Service Pack 2 for TX Text Control X14 and TX Spell .NET 6.0 Released announced.

The download package holds the setups TX Spell .NET for WPF 6.0 SP1.exe, dated November 23, 2016, and TX Spell .NET for WPF 6.0 SP2.exe, dated June 12, 2017, as well as the full version setup TX Spell .NET for WPF 6.0.exe, dated June 12, 2017. These are the dates of the setup files, not release dates.

New Classes, Properties, Methods and Events

The classes and members below are the ones that the What's New documentation of version 6.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 gives IncorrectWordChangingEventArgs.Cancel as a method; it is a property. It doesn't list the SuggestionDictionariesHandler class, which the feature description of the version names.

New Classes

Members by Class

Next Steps