TX Spell .NET for WPF

UserDictionary Constructor

Constructor
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

Initializes a new instance of the UserDictionary class.

Syntax

UserDictionary()

Creates an empty instance of the UserDictionary class.

public UserDictionary();

UserDictionary(string)

Initializes a new instance of the UserDictionary class by loading a specific user dictionary file.

public UserDictionary(string userDictionaryPath);
ParameterDescription
userDictionaryPath

Specifies the path of the user dictionary file. Using the dictionary name without any file path, the corresponding dictionary file in the default dictionary folder is used. The name of the specified user dictionary file must end with ".txd". If the file does not exist, or if it is not valid, an ArgumentException is thrown.

UserDictionary(string[], CultureInfo)

Initializes a new instance of the UserDictionary class by loading a string array that represents the content of a user dictionary file.

public UserDictionary(string[] dictionaryLines, CultureInfo language);
ParameterDescription
dictionaryLines

The string array that represents the content of a user dictionary file. Each string of the array IS considered as a line of the dictionary file.

language

Specifies the language of the dictionary.

Examples

The following example creates an User Dictionary instance and configures its is editable setting for a document workflow.

TXTextControl.Proofing.UserDictionary userDictionary = new();
userDictionary.IsEditable = true;

Further Reading

  • TX Spell .NET: Ignore Word List Using User Dictionaries –
  • Loading Dictionaries Dynamically in TX Spell .NET –
  • Spell Checking, MailMerge and UserDictionaries –