TX Text Control .NET for WPF

AdaptedFontName Property

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

Description

Gets or sets the adapted font. When the event occurs the property contains the name of the font which replaces the original font. If the property is changed, TextControl uses the changed font to replace the original font. The font must be one of the fonts listed in the array of supported fonts. This array can be obtained with the AdaptFontEventArgs.SupportedFonts property.

Syntax

public string AdaptedFontName { get; set; }

Examples

The following example uses AdaptFontEventArgs.AdaptedFontName while handling AdaptFont.

textControl.AdaptFont += (_, e) =>
{
    Console.WriteLine($"Adapted Font Name: {e.AdaptedFontName}");
};