TX Text Control .NET for Windows Forms

HyphenateWordEventArgs Class

Class|Introduced in 20.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXTextControl.dll
Install
dotnet add package TXTextControl.TextControl.WinForms.SDK .NET 8 and later. For .NET Framework, reference TXTextControl.dll from the setup.
Inherits
  1. EventArgs
  2. HyphenateWordEventArgs

Description

The HyphenateWordEventArgs class provides data for the TextControl.HyphenateWord, ServerTextControl.HyphenateWord and WPF.TextControl.HyphenateWord events.

Syntax

public class HyphenateWordEventArgs : EventArgs

Examples

The following example uses HyphenateWordEventArgs.DividePos while handling HyphenateWord.

textControl.HyphenateWord += (_, e) =>
{
    Console.WriteLine($"Divide Pos: {e.DividePos}");
};

Members

Properties

PropertyDescription
CultureGets the culture of the word to hyphenate.
DividePosGets or sets the position at which the word should be divided. When a spellchecker has been connected with the SpellChecker property, this value has been calculated through the spellchecker. Otherwise it is zero. A TextControl uses this position to divide the word, when it is less or equal then MaxDividePos.
MaxDividePosGets the maximum dividing position. For example, when this value is 3, the first 3 characters of the word is the maximum part of the word which fit on the line.
WordGets the word to hyphenate.