TX Spell .NET for WPF

AddToDictionary Method

Method|Introduced in 6.0
Namespace
TXTextControl.Proofing
Package
TXTextControl.TXSpell.WPF.SDK as TXSpell.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TXSpell.Core.SDK as TXSpell.dll

Description

Adds the text of the current word to correct to all user dictionaries of the current dictionary collection where the IsEditable property is set to true and the language property corresponds to the TXTextControl.MisspelledWord.Culture or incorrect word's language property. Furthermore the word is removed from all corresponding collections (TXTextControl.MisspelledWordCollection/ IncorrectWordCollection).

Syntax

public void AddToDictionary();

Examples

The following example uses Add To Dictionary in a focused Correction Handler workflow. The created object is then available to the surrounding document workflow.

correctionHandler.AddToDictionary();
Console.WriteLine("Correction Handler is ready for use.");

Remarks

This method is only enabled if appropriated user dictionaries are available and the SpellingCorrectionUIProvider's mode is set to SuggestionsCreated or NoSuggestionsCreated.