TX Text Control .NET for WPF

HyphenateWord Event

Event|Introduced in 20.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WPF.SDK as TXTextControl.Server.dll from the private NuGet feed or Text Control Offline Packages

Description

Occurs, if a word does not fit on the line and must be hyphenated. This event occurs only, if the IsHyphenationEnabled property has been set to true. The event handler receives an argument of type HyphenateWordEventArgs containing data related to this event.

Syntax

public event HyphenateWordEventHandler HyphenateWord;

Examples

The following example records useful context when hyphenate word occurs.

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