TX Spell .NET for Windows Forms

HyphenationList Class

Class|Introduced in 4.0
Namespace
TXTextControl.Proofing
Package
TXTextControl.TXSpell.WinForms.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXSpell.dll
Install
dotnet add package TXTextControl.TXSpell.WinForms.SDK .NET 8 and later. For .NET Framework, reference TXSpell.dll from the setup.
Also in
TXTextControl.TXSpell.Core.SDK as TXSpell.dll

Description

The HyphenationList class represents a list of hyphenation rules that gets its content from a Hunspell Open Source hyphenation dictionary. As with all objects of type HyphenationList the content of that list is only accessed when the dictionary is added to the TXSpell.HyphenationLists collection. The first implementation loads a Hunspell Open Source hyphenation dictionary from a file that is defined by a dictionary path. Using the dictionary name only without a file path, the corresponding dictionary file of the default hyphenation list folder is used. The second constructor loads a hyphenation dictionary from string arrays that represent the content of a Hunspell Open Source hyphenation dictionary. It is recommended to create these arrays by using the encoding that is defined in the corresponding file represented by the encoding string in the first line. Using this implementation, it is also required to define the language of the dictionary by setting the System.Globalization.CultureInfo language parameter that sets the Proofing.HyphenationList.Language property automatically.

Syntax

public sealed class HyphenationList

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;

Members

Constructors

ConstructorDescription
HyphenationListInitializes a new instance of the HyphenationList class.

Properties

PropertyDescription
HyphenateCapitalizedWordsGets or sets a value indicating whether words in uppercase will be hyphenated. The default value is true.
IsSelectedAsDefaultGets a value indicating whether the hyphenation list is selected as the default hyphenation list by the HyphenationLanguage property. The default value is false.
LanguageGets or sets the hyphenation list's language.
MinCharsAtWordBeginSpecifies the minimum number of joined characters at the beginning of a hyphenated word. The default value is 2.
MinCharsAtWordEndSpecifies the minimum number of joined characters at the end of a hyphenated word. The default value is 2.
MinSyllablesAfterCompoundHyphenationPointSpecifies the minimum number of syllables behind a compound hyphenation point. The default value is 1.
MinSyllablesBeforeCompoundHyphenationPointSpecifies the minimum number of syllables before a compound hyphenation point. The default value is 1.
NameGets or sets the hyphenation list's name.
UseOnlyCompoundHyphenationPointsGets or sets a value indicating whether words will be only hyphenated at compound junctions. The default value is false.