UserDictionary Constructor
- Namespace
TXTextControl.Proofing
- Package
TXTextControl.asTXSpell. WinForms. SDK TXSpell.from the private NuGet feed or Text Control Offline Packagesdll
- Also in
TXTextControl.asTXSpell. Core. SDK TXSpell.dll
Description
Initializes a new instance of the UserDictionary class.
Syntax
UserDictionary()
Creates an empty instance of the UserDictionary class.
public UserDictionary();Public Sub New()UserDictionary(string)
Initializes a new instance of the UserDictionary class by loading a specific user dictionary file.
public UserDictionary(string userDictionaryPath);Public Sub New(userDictionaryPath As String)| Parameter | Description |
|---|---|
| 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);Public Sub New(dictionaryLines As String(), language As CultureInfo)| Parameter | Description |
|---|---|
| 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;Dim userDictionary As New TXTextControl.Proofing.UserDictionary()
userDictionary.IsEditable = True