# TXSpellChecker

> TXSpellChecker, the XAML resource of TX Spell .NET for WPF: what it checks, how it connects to a TextControl or other controls, and its key members by task.

- **Product:** TX Spell .NET for WPF
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Spell .NET for WPF > Overview > Components > TXSpellChecker
- **1718 words**
- **Web URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/overview/components/txspellchecker/
- **LLMs URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/overview/components/txspellchecker/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/overview/components/txspellchecker/llms-full.txt

---

`TXSpellChecker` is the spell checker of TX Spell .NET for WPF that you declare in the XAML of a window. It checks the text of a TX Text Control editor as the user types, checks the text of other controls on request, and brings the spell check dialog, the options dialog and the items of the spell check context menu. What follows describes what it does, how it connects to your controls and which members you use most.

### What TXSpellChecker Is

The class is `TXTextControl.WPF.Proofing.TXSpellChecker`. It has no user interface of its own and isn't placed in the layout of a window: you declare it as a resource, and its dialogs and menus open only when a user or your code asks for them.

It comes with the NuGet package `TXTextControl.TXSpell.WPF.SDK`, in the assembly *TXSpell.WPF.dll*. The package brings the US English dictionary, hyphenation list and thesaurus with it. Code that uses the spell checker needs two namespaces: `TXTextControl.WPF.Proofing` for the spell checker and its dialogs, and `TXTextControl.Proofing` for the classes and enumerations it shares with the other TX Spell .NET products.

### What You Do With It

- **Check TX Text Control as the user types.** Connected to a `TextControl`, it underlines misspelled words with a red zigzag line and offers corrections in the context menu. [As-You-Type Checking](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/as-you-type/llms-full.txt)
- **Check any other control.** [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 text, such as the text of a `RichTextBox` or a `TextBox`. [Checking on Demand](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/on-demand/llms-full.txt)
- **Walk the user through the misspelled words.** Its spell check dialog and options dialog are built in. [Spell Check Dialog and Options Dialog](https://docs.textcontrol.com/tx-spell-dotnet-wpf/overview/components/dialogs/llms-full.txt)
- **Offer suggestions.** For a context menu of your own, a list or a dialog. [Context Menu and Suggestion Controls](https://docs.textcontrol.com/tx-spell-dotnet-wpf/overview/components/context-menu/llms-full.txt)
- **Hyphenate, look up synonyms and detect languages**, with the same language data. [Hyphenation](https://docs.textcontrol.com/tx-spell-dotnet-wpf/hyphenation/llms-full.txt), [Language Detection](https://docs.textcontrol.com/tx-spell-dotnet-wpf/dictionaries/language-detection/llms-full.txt)

One `TXSpellChecker` serves every control of a window: the dictionaries are loaded once, and a word the user adds to a user dictionary counts in all editors. [Checking Multiple Controls](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/multiple-controls/llms-full.txt) shows how.

### How You Connect It

To connect it to TX Text Control, declare the spell checker as a resource of the window and set the [SpellChecker](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/spellchecker-property/llms-full.txt) property of the `TextControl` to its key. [As-You-Type Checking](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/as-you-type/#connect-the-spell-checker-in-xaml) shows the XAML, and [Create Your First WPF Application](https://docs.textcontrol.com/tx-spell-dotnet-wpf/getting-started/tx-text-control/first-application/llms-full.txt) builds such a window step by step.

A `RichTextBox`, a `TextBox` or any other control doesn't talk to the spell checker itself: your code passes its text to [Check](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/check-method/llms-full.txt) and applies the corrections. [Product Architecture](https://docs.textcontrol.com/tx-spell-dotnet-wpf/overview/architecture/#how-other-controls-use-it) describes the steps, and [Checking on Demand](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/on-demand/#check-a-textbox-in-the-dialog) shows the code.

### Key Members

| Group | Members | Purpose |
|---|---|---|
| Checking | [Check](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/check-method/llms-full.txt), [IncorrectWords](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/incorrectwords-property/llms-full.txt), [IgnoreWord](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/ignoreword-property/llms-full.txt), [IgnoreCase](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/ignorecase-property/llms-full.txt) | Find misspelled words, and choose which words are skipped |
| Suggestions | [CreateSuggestions](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/createsuggestions-method/llms-full.txt), [Suggestions](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/suggestions-property/llms-full.txt) | Create the corrections for a word |
| Dictionaries | [Dictionaries](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/dictionaries-property/llms-full.txt), [Language](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/language-property/llms-full.txt), [AvailableDictionaries](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/availabledictionaries-property/llms-full.txt) | Load dictionaries and user dictionaries, and choose the default one |
| Hyphenation | [GetHyphenationPoints](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/gethyphenationpoints-method/llms-full.txt), [HyphenationLists](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/hyphenationlists-property/llms-full.txt), [HyphenationLanguage](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/hyphenationlanguage-property/llms-full.txt) | Hyphenate words |
| Synonyms | [CreateSynonyms](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/createsynonyms-method/llms-full.txt), [SynonymLists](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/synonymlists-property/llms-full.txt) | Look up synonyms |
| Language detection | [DetectLanguageScopes](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/detectlanguagescopes-method/llms-full.txt), [DetectableLanguageScopes](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/detectablelanguagescopes-property/llms-full.txt) | Find out in which language a text is written |
| User interface | [SpellCheckDialog](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/spellcheckdialog-property/llms-full.txt), [OptionsDialog](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/optionsdialog-method/llms-full.txt), [GetMenuItems](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/getmenuitems-method/llms-full.txt), [SpellingCorrectionUIProvider](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/spellingcorrectionuiprovider-property/llms-full.txt) | Open the dialogs, build menus and correction panels |
| Events | [IncorrectWordChanging](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/incorrectwordchanging-event/llms-full.txt), [MisspelledWordChanging](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/misspelledwordchanging-event/llms-full.txt), [SpellCheckDialogClosing](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/spellcheckdialogclosing-event/llms-full.txt), [UserDictionaryWordAdded](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/userdictionarywordadded-event/llms-full.txt) | React to corrections, the dialog and the dictionaries |
| Language data folders | [DictionariesDirectoryPath](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/dictionariesdirectorypath-property/llms-full.txt), [HyphenationListsDirectoryPath](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/hyphenationlistsdirectorypath-property/llms-full.txt), [SynonymListsDirectoryPath](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/synonymlistsdirectorypath-property/llms-full.txt), [LanguageRecognitionDirectoryPath](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/languagerecognitiondirectorypath-property/llms-full.txt) | Read the language data from other folders than the defaults |

[Events](https://docs.textcontrol.com/tx-spell-dotnet-wpf/spell-checking/events/llms-full.txt) lists all events, and the [TXSpellChecker](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/llms-full.txt) reference all members.

### Next Steps

- [Create Your First WPF Application](https://docs.textcontrol.com/tx-spell-dotnet-wpf/getting-started/tx-text-control/first-application/llms-full.txt): a word processor with spell checking.
- [TXSpell](https://docs.textcontrol.com/tx-spell-dotnet-wpf/overview/components/txspell/llms-full.txt): the same checks without a user interface.
- [Spell Check Dialog and Options Dialog](https://docs.textcontrol.com/tx-spell-dotnet-wpf/overview/components/dialogs/llms-full.txt): the dialogs of the spell checker.
- [Loading and Managing Dictionaries](https://docs.textcontrol.com/tx-spell-dotnet-wpf/dictionaries/managing/llms-full.txt): other languages and user dictionaries.

---

## Nearby

- **Previous:** [Components](https://docs.textcontrol.com/tx-spell-dotnet-wpf/overview/components/llms-full.txt)
- **Next:** [Spell Check Dialog and Options Dialog](https://docs.textcontrol.com/tx-spell-dotnet-wpf/overview/components/dialogs/llms-full.txt)
