TX Spell .NET for WPF

Spell Checking Examples

Topic

Checking spelling as the user types, walking through a document in the spell check dialog and offering suggestions in a context menu: the samples below show each of these with TX Spell .NET for WPF, in TX Text Control and in the standard text controls of WPF. All WPF samples come with the setup. The repositories on GitHub and the articles of the Text Control Blog were written for Windows Forms or for the TXSpell class, and the list says which.

Samples of the Setup

The setup installs these samples in C# and Visual Basic, below TX Spell 11.0.NET for WPF\Samples\WPF in your Documents folder, in the folder CSharp or VB.NET. Each is a WPF project with a TXSpellChecker.

With TX Text Control

ExampleWhat it showsWhere
SimpleA spell checker connected to a TextControl, which marks misspelled words as the user typesTextControl\Simple
Context menuA context menu of your own with the suggestions for a misspelled word, from GetMenuItemsTextControl\Context menu strip
Spell check dialogThe SpellCheckDialog of TX Spell .NET, which you can customize, instead of the dialog of TX Text ControlTextControl\SpellCheckDialog
Several controlsOne TXSpellChecker for several TextControl instancesTextControl\Multiple controls
Dialog for several controlsOne spell check dialog that walks through four TextControl instances and their text parts, switching controls in SpellCheckDialogClosingTextControl\SpellCheckDialog on multiple controls
Dialog for chosen text partsCheck boxes choose which text parts the dialog checks: the main text, headers, footers and text frames, through the SpellCheckDialogStateManagerTextControl\SpellCheckDialog on specific text parts
Correction user interfaceA user interface of your own for corrections, bound to the SpellingCorrectionUIProvider, in a simple and an advanced versionTextControl\SpellingCorrectionUIProvider

With RichTextBox and TextBox

ExampleWhat it showsWhere
Spell check dialogCheck finds the misspelled words of a RichTextBox, and the spell check dialog shows themRichTextBox\SpellCheckDialog
Context menuSuggestions in the context menu of a RichTextBoxRichTextBox\Context menu strip
Several controls, as you typeFour RichTextBox controls that share one spell checker: when the text of one changes, Check checks it and the misspelled word at the caret turns red, as As-You-Type Checking showsSamples of the setup; the documentation names no folder
Dialog for several controlsOne spell check dialog for four RichTextBox controlsSpellCheckDialog on multiple controls
Check simple textThe text of a TextBox, checked on demand with Check of the TXSpellChecker and by a validation rule of the bindingCheck simple text

Getting Started builds the first of these samples step by step.

GitHub Samples

No repository on GitHub is a WPF application with TX Spell .NET. The spell checking Web API and the ASP.NET validation sample use only the TXSpell class, and the AutoCorrect and suggestion samples are Windows Forms applications; GitHub Examples describes them.

Next Steps