TX Spell .NET for Windows Forms

HyphenationList Constructor

Constructor|Introduced in 4.0
Namespace
TXTextControl.Proofing
Package
TXTextControl.TXSpell.WinForms.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 HyphenationList class.

Syntax

HyphenationList(string)

Initializes a new instance of the HyphenationList class by loading a Hunspell Open Source hyphenation dictionary from a file.

public HyphenationList(string hyphenationListPath);
ParameterDescription
hyphenationListPath

Specifies the path for the Hunspell Open Source hyphenation dictionary dict file. By specifying only the the dictionary name without any file path, the corresponding hyphenation dictionary file of the default hyphenation list folder is used. The name of the specified Hunspell Open Source hyphenation dictionary file must start with "hyph_" and end with ".dic". If the file does not exist, an ArgumentException is thrown.

HyphenationList(string[], CultureInfo)

Initializes a new instance of the HyphenationList class by loading a hyphenation dictionary from string arrays that represent the content of a Hunspell Open Source hyphenation dictionary

public HyphenationList(string[] hyphenationListLines, CultureInfo language);
ParameterDescription
hyphenationListLines

The string array that represents the content of a Hunspell Open Source hyphenation dictionary file. Each string of this array is considered as a line of the dictionary file.

language

Specifies the language of the hyphenation list.

Examples

The following example creates a Hyphenation List instance and configures its min syllables after compound hyphenation point setting for a document workflow.

TXTextControl.Proofing.HyphenationList hyphenationList = new("document.docx");
hyphenationList.MinSyllablesAfterCompoundHyphenationPoint = 10;