# Spell Checking Examples

> WPF samples of TX Spell .NET in C# and Visual Basic: TextControl and RichTextBox with the spell check dialog, context menus, text parts and TextBox validation.

- **Product:** TX Spell .NET for WPF
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Spell .NET for WPF > Examples > Spell Checking Examples
- **974 words**
- **Web URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/examples/spell-checking/
- **LLMs URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/examples/spell-checking/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/examples/spell-checking/llms-full.txt

---

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](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/llms-full.txt).

#### With TX Text Control

| Example | What it shows | Where |
|---|---|---|
| Simple | A spell checker connected to a `TextControl`, which marks misspelled words as the user types | *TextControl\\Simple* |
| Context menu | A context menu of your own with the suggestions for a misspelled word, from [GetMenuItems](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/getmenuitems-method/llms-full.txt) | *TextControl\\Context menu strip* |
| Spell check dialog | The [SpellCheckDialog](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/spellcheckdialog/llms-full.txt) of TX Spell .NET, which you can customize, instead of the dialog of TX Text Control | *TextControl\\SpellCheckDialog* |
| Several controls | One `TXSpellChecker` for several `TextControl` instances | *TextControl\\Multiple controls* |
| Dialog for several controls | One spell check dialog that walks through four `TextControl` instances and their text parts, switching controls in [SpellCheckDialogClosing](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/spellcheckdialogclosing-event/llms-full.txt) | *TextControl\\SpellCheckDialog on multiple controls* |
| Dialog for chosen text parts | Check boxes choose which text parts the dialog checks: the main text, headers, footers and text frames, through the [SpellCheckDialogStateManager](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/spellcheckdialogstatemanager/llms-full.txt) | *TextControl\\SpellCheckDialog on specific text parts* |
| Correction user interface | A user interface of your own for corrections, bound to the [SpellingCorrectionUIProvider](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/spellingcorrectionuiprovider/llms-full.txt), in a simple and an advanced version | *TextControl\\SpellingCorrectionUIProvider* |

#### With RichTextBox and TextBox

| Example | What it shows | Where |
|---|---|---|
| Spell check dialog | [Check](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/check-method/llms-full.txt) finds the misspelled words of a `RichTextBox`, and the spell check dialog shows them | *RichTextBox\\SpellCheckDialog* |
| Context menu | Suggestions in the context menu of a `RichTextBox` | *RichTextBox\\Context menu strip* |
| Several controls, as you type | Four `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](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/as-you-type/llms-full.txt) shows | Samples of the setup; the documentation names no folder |
| Dialog for several controls | One spell check dialog for four `RichTextBox` controls | *SpellCheckDialog on multiple controls* |
| Check simple text | The text of a `TextBox`, checked on demand with `Check` of the `TXSpellChecker` and by a validation rule of the binding | *Check simple text* |

[Getting Started](https://docs.textcontrol.com/tx-spell-dotnet-wpf/getting-started/llms-full.txt) 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](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/txspell/llms-full.txt) class, and the AutoCorrect and suggestion samples are Windows Forms applications; [GitHub Examples](https://docs.textcontrol.com/tx-spell-dotnet-wpf/examples/github/llms-full.txt) describes them.

### Next Steps

- [Dictionary and Language Examples](https://docs.textcontrol.com/tx-spell-dotnet-wpf/examples/dictionaries/llms-full.txt): dictionaries, hyphenation, synonyms and language detection.
- [Spell Checking](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/llms-full.txt): the ways to check spelling, explained.
- [Customizing the Spell Check Dialog](https://docs.textcontrol.com/tx-spell-dotnet-wpf/user-interface/customizing-dialog/llms-full.txt): change the dialog to fit your application.

---

## Nearby

- **Previous:** [GitHub Examples](https://docs.textcontrol.com/tx-spell-dotnet-wpf/examples/github/llms-full.txt)
- **Next:** [Dictionary and Language Examples](https://docs.textcontrol.com/tx-spell-dotnet-wpf/examples/dictionaries/llms-full.txt)
