The UserDictionary class represents a dictionary that allows to use, create and edit user dictionaries. The first constructor creates an empty UserDictionary object with no reference to a file. The second constructor initializes a new UserDictionary object that is filled with the content of a specified word list file. As with all dictionaries of type Dictionary, the content of the dictionary is only accessed when the dictionary was added to the TXSpell.Dictionaries collection. The third constructor loads a dictionary from string arrays that represent the content of an user dictionary. It is recommended to create that array by using the encoding that was used to create the source of that dictionary. Using that implementation, it is required to define the language of the dictionary through the System.Globalization.CultureInfo language parameter that sets the user dictionary's Language property automatically. To declare a specific encoding for the dictionary, use the Dictionary.DictionaryEncoding property. If the encoding is not declared through the property or inside the word list file, the encoding of operation system's current ANSI code page is used. The UserDictionary class is inherited from the abstract class Dictionary.


public class UserDictionary : Dictionary
Public Class UserDictionary
  Inherits Dictionary


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


Method Description
AddWord Adds a word to the user dictionary.
RemoveAllWords Removes all words from the user dictionary.
RemoveWord Removes a word the user dictionary.
Save Saves the complete content of the user dictionary in a file at the specified path or as a string array.
ToArray Converts all user dictionary entries to a string array.


Property Description
DictionaryEncoding Gets or sets the dictionary's encoding.
(Inherited from Dictionary)
DisplayName Gets or sets the text that is displayed for the dictionary inside the options dialog or the SpellCheckDialog's SuggestionDictionaryComboBox.
(Inherited from Dictionary)
FilePath Gets the name and path of the file that has been used to load this user dictionary or where it has been saved to.
IsEditable Gets or sets a value indicating whether the user dictionary is editable or not.
IsGetSuggestionsEnabled Gets or sets a value that indicates whether suggestions are created using this dictionary or not.
(Inherited from Dictionary)
IsSelectedAsDefault Gets a value indicating whether the dictionary is selected as the default dictionary by the Language property.
(Inherited from Dictionary)
IsSpellCheckingEnabled Gets or sets a value indicating whether spell checking of this dictionary is enabled or not.
(Inherited from Dictionary)
Language Gets or sets the dictionary's language.
(Inherited from Dictionary)
Name Gets or sets the dictionary's name.
(Inherited from Dictionary)
ShowInOptionsDialog Gets or sets a value indicating whether the dictionary is shown in the options dialog.
(Inherited from Dictionary)