The TXSpellChecker class implements a component with spell checking features. It allows to set general spell checking settings by using an options dialog, to invoke a customizable SpellCheckDialog that can be connected to different types of controls (e.g. TXTextControl.WPF.TextControl and System.Windows.Controls.RichtTextBox) and to create a spell checking context menu by using the TXSpellChecker.GetMenuItems method. Currently, TXTextControl (version 17.0 and better) provides the WPF.TextControl.SpellChecker Property to connect the TXSpellChecker with its TextControl component. To invoke the internal or an own spell check context menu on right-clicking a misspelled word, the WPF.TextControl.SpellCheckContextMenuStrip proeprty must be set. The following describes only the properties, methods and events defined through the TXSpellChecker class.

Syntax

public sealed class TXSpellChecker
Public NotInheritable Class TXSpellChecker

Constructors

Constructor Description
TXSpellChecker Initializes a new instance of the TXSpellChecker class.

Events

Event Description
DialogButtonClicked Occurs when a dialog button of the built-in SpellCheckDialog is clicked.
DictionaryAdded Occurs when a dictionary is added to the TXSpellChecker.Dictionaries DictionaryCollection.
DictionaryRemoved Occurs when a dictionary is removed from the TXSpellChecker.Dictionaries DictionaryCollection.
IncorrectWordChanging Occurs when an object of type IncorrectWord is changing by spell check context menu or spell check dialog operations.
MenuItemClicked Occurs when a MenuItem is clicked.
MisspelledWordChanging Occurs when an object of type TXTextControl.MisspelledWord is changing by spell check context menu or spell check dialog operations.
OptionsDialogOpening Occurs when the built-in options dialog is invoked by the TXSpellChecker.OptionsDialog method or clicking the Options...
SpellCheckDialogClosing Occurs when the built-in spell check dialog is closing.
SpellCheckDialogOpening Occurs when the built-in spell check dialog is invoked using the SpellCheckDialog.Show method.
UserDictionaryWordAdded Occurs when a word is added to a user dictionary.
UserDictionaryWordRemoved Occurs when a word is removed from a user dictionary.

Methods

Method Description
Check Checks text for spelling errors and fills the IncorrectWordCollection at TXSpellChecker.IncorrectWords with all incorrect words.
Create Initializes the resources of a newly instantiated TXSpellChecker object.
CreateSuggestions Determines suggestions for a specific incorrect word by using selected dictionaries of the DictionaryCollection at TXSpellChecker.Dictionaries and adds the results to the SuggestionCollection at TXSpellChecker.Suggestions.
CreateSynonyms Returns groups of synonyms that represent equivalent expressions for a specific text.
DetectLanguageScopes Detects language scopes in a text and fills the results into the LanguageScopeCollection at TXSpellChecker.LanguageScopes.
GetHyphenationPoint Returns the next hyphenation point for a specific word right before a defined divide position.
GetHyphenationPoints Returns an array of all hyphenation points for a word.
GetMenuItems Returns an array of MenuItems, which are used to create a custom spell check ContextMenu.
OptionsDialog Invokes the built-in dialog box to define spell check, create suggestions and hyphenation and create synonyms settings..

Properties

Property Description
AvailableDictionaries Gets a list of all available dictionaries in the default dictionary folder.
AvailableHyphenationLists Gets a list of all available hyphenation lists of the default hyphenation lists folder.
AvailableSynonymLists Gets a list of all available synonym lists of the default synonym lists folder.
DetectableLanguageScopes Gets or sets a list of all languages that are used to detect language scopes in a text.
Dictionaries Gets a collection of all added and validated dictionaries.
DictionariesDirectoryPath Gets or sets the path to the default dictionaries folder.
HyphenationLanguage Gets or sets the name of a hyphenation list that is located at the default hyphenation lists folder.
HyphenationLists Gets a collection of all added hyphenation dictionaries.
HyphenationListsDirectoryPath Gets or sets the path to the default hyphenation lists folder.
IgnoreCase Gets or sets a value of type IgnoreCaseSettings determining if and how the case of a word is ignored while spell checking.
IgnoreWord Gets or sets a value of type IgnoreWordSettings determining when a word should not be spell checked.
IncorrectWords Gets a collection of all incorrect words that were detected by the last call of the TXSpellChecker.Check method.
Language Gets or sets the name of a dictionary that is located at the default dictionary folder.
LanguageRecognitionDirectoryPath Gets or sets the path to the language recognition folder that provides the languageRecognition.resources file which is required to detect language scopes in a text.
LanguageScopes Gets a collection of all detected language scopes.
SpellCheckDialog Gets an object of type SpellCheckDialog that is used to modify and show the built-in SpellCheckDialog.
SpellingCorrectionUIProvider Gets an object of type SpellingCorrectionUIProvider to provide methods and properties for constructing a spelling correction user interface.
Suggestions Gets a collection of suggestions that were created by the last call of the TXSpellChecker.CreateSuggestions method.
SynonymLanguage Gets or sets the name of a synonym list that is located at the default synonym lists folder.
SynonymLists Gets a collection of all added synonym lists.
SynonymListsDirectoryPath Gets or sets the path to the default synonym lists folder.