User Dictionary (Add to Dictionary Feature)

There are some words not present in the dictionary that the user might want to store. There is an option to create our own dictionary where the user can add these words. In order to enable that feature, please set a valid file path for the property SpellCheckOptions.DictionaryFile.UserDictionaryFilePath where the control will write the words you choose to add.

If the file does not exist at that location, the control will create a new file. Make sure that you set the path to a folder where the Application will have WRITE permission. Also make sure to set SpellCheckOptions.DictionaryFile.EnableUserDictionary = True.

Below is a code snippet enabling this feature

wpfHtmlEditor1.SpellCheckOptions.DictionaryFile.UserDictionaryFilePath =
         Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\user_dictionary.dic";

User dictionary inline

User dictionary dialog

When the user clicks on "Add to Dictionary” button, the word is written to the specified file.

Last updated on 29 May 2015, Friday, 1:35:07 AM
If you have any questions or concerns about this tutorial, Please feel free to share your comment.