# Spell Checking

> Spell check WPF windows with one TXSpellChecker resource: underline words in TextControl, validate a TextBox, open a dialog, read suggestions and ignore words.

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

---

Spell checking in TX Spell .NET for WPF reaches the user in two ways: misspelled words are underlined while they type, and a dialog walks through them when they ask for a check. Behind both is one `TXSpellChecker` component, which also hands your code the incorrect words and their suggestions. Read on for what users see and how you control it, from connecting the first editor to building a correction interface of your own.

![A TextControl with red zigzag lines under misspelled words and the spell check context menu of the word "sampke".](https://docs.textcontrol.com/assets/img/tx-spell-dotnet-wpf/textcontrol-context-menu.e3692bcd.webp)

### How Spell Checking Works

A [TXSpellChecker](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/llms-full.txt), declared as a resource of the window, holds the dictionaries and does the checking. How it reaches the text depends on the control:

- **TX Text Control** checks the words itself once its `SpellChecker` property holds the key of the spell checker resource. It underlines misspelled words, offers suggestions in its context menu and opens a spelling dialog, all without code.
- **Any other control**, such as a `TextBox` or a `RichTextBox`, passes its text to the spell checker's `Check` method. The result is a list of incorrect words that your code marks, or that the spell check dialog of TX Spell .NET walks through.

One spell checker serves every control in a window, and its dictionaries decide the languages. [Dictionaries and Languages](https://docs.textcontrol.com/tx-spell-dotnet-wpf/dictionaries/llms-full.txt) covers them.

### Find the Right Page

| If you want to | Read |
|---|---|
| Underline misspelled words while the user types | [As-You-Type Checking](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/as-you-type/llms-full.txt) |
| Start a check from a button and correct words in a dialog | [Checking on Demand](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/on-demand/llms-full.txt) |
| Read the misspelled words and their suggestions in code | [Incorrect Words and Suggestions](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/suggestions/llms-full.txt) |
| Skip words in capitals, with numbers, URLs or e-mail addresses | [Ignore Settings](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/ignore-settings/llms-full.txt) |
| Use one spell checker for several editors | [Checking Multiple Controls](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/multiple-controls/llms-full.txt) |
| Check only chosen headers, footers or text frames | [Checking Text Parts](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/text-parts/llms-full.txt) |
| Build a correction panel or dialog of your own | [Spelling Correction Modes and UI Provider](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/correction-modes/llms-full.txt) |
| React to corrections, dialogs and dictionary changes | [Events](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/events/llms-full.txt) |

### Where to Start

1. [As-You-Type Checking](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/as-you-type/llms-full.txt) connects the spell checker to an editor, the step every other page builds on.
2. [Checking on Demand](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/on-demand/llms-full.txt) adds the spelling dialog.
3. [Ignore Settings](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/ignore-settings/llms-full.txt) adjusts what is reported, before users meet false alarms.

If the component is not in your window yet, [Getting Started](https://docs.textcontrol.com/tx-spell-dotnet-wpf/getting-started/llms-full.txt) sets it up. The dialogs and menus themselves, and how to change them, are the subject of [User Interface](https://docs.textcontrol.com/tx-spell-dotnet-wpf/user-interface/llms-full.txt).

### Pages in This Section

- [As-You-Type Checking](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/as-you-type/llms-full.txt): red underlines in TX Text Control, and a validation rule for a `TextBox`.
- [Checking on Demand](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/on-demand/llms-full.txt): the spelling dialogs of TX Text Control and TX Spell .NET, for any control.
- [Incorrect Words and Suggestions](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/suggestions/llms-full.txt): `Check`, `CreateSuggestions` and the misspelled words of TX Text Control.
- [Ignore Settings](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/ignore-settings/llms-full.txt): case, uppercase words, numbers, addresses, duplicates and ignore lists.
- [Checking Multiple Controls](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/multiple-controls/llms-full.txt): one spell checker and one dialog for several editors.
- [Checking Text Parts](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/text-parts/llms-full.txt): the main text, headers, footers and text frames in the dialog.
- [Spelling Correction Modes and UI Provider](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/correction-modes/llms-full.txt): the correction modes and a data-bound correction panel.
- [Events](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/events/llms-full.txt): every event of the spell checker, with its arguments.

---

## In This Section

- [As-You-Type Checking](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/as-you-type/llms-full.txt): Underline misspelled words as users type in a WPF TextControl with a TXSpellChecker resource in XAML, and validate a TextBox with a spelling ValidationRule.
- [Spelling Correction Modes and UI Provider](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/correction-modes/llms-full.txt): Bind WPF controls to SpellingCorrectionUIProvider: suggestions, enabled states per mode, a sentence preview, editing a word by hand and a custom dialog.
- [Events](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/events/llms-full.txt): Handle TXSpellChecker events in WPF code-behind: IncorrectWordChanging, MisspelledWordChanging, dialog closing, OptionsDialogOpening and dictionary changes.
- [Ignore Settings](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/ignore-settings/llms-full.txt): Skip capitals, numbers, URLs or duplicates in WPF with IgnoreCase and IgnoreWord, ignore single words with Ignore All and lock an ignore list of names.
- [Checking Multiple Controls](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/multiple-controls/llms-full.txt): Share one TXSpellChecker resource between several WPF TextControls in XAML, and check TextControls or TextBoxes in one dialog with SpellCheckDialogClosing.
- [Checking on Demand](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/on-demand/llms-full.txt): Open a spelling dialog from a WPF button: TextControl.SpellCheckDialog, SpellCheckDialog.Show for TX Text Control, and Check with Show(Window) for a TextBox.
- [Incorrect Words and Suggestions](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/suggestions/llms-full.txt): Get IncorrectWords after Check in WPF, create suggestions with CreateSuggestions, and replace a MisspelledWord of a TextControl with GetItem and Remove.
- [Checking Text Parts](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/text-parts/llms-full.txt): Steer the WPF spelling dialog through the text parts of a TextControl: count misspelled words per header, footer or frame and start in a header with SetNext.

---

## Nearby

- **Previous:** [Checking Text in Code](https://docs.textcontrol.com/tx-spell-dotnet-wpf/getting-started/in-code/llms-full.txt)
- **Next:** [As-You-Type Checking](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/as-you-type/llms-full.txt)
