AdaptFontEventArgs Class
- Namespace
TXTextControl
- Package
TXTextControl.from the private NuGet feed or Text Control Offline PackagesTextControl. Core. SDK
- Assembly
TXTextControl.Core. dll
- Install
dotnet add package TXTextControl..NET 8 and later. For .NET Framework, referenceTextControl. Core. SDK TXTextControl.from the setup.dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXTextControl.dll
- Inherits
- Event
Args - Adapt
Font Event Args
- Event
Description
The AdaptFontEventArgs class provides data for the TextControl.AdaptFont, WPF.TextControl.AdaptFont and ServerTextControl.AdaptFont events.
Syntax
public class AdaptFontEventArgs : EventArgsPublic Class AdaptFontEventArgs
Inherits EventArgsExamples
The following example uses AdaptFontEventArgs.FontName while handling AdaptFont.
textControl.AdaptFont += (_, e) =>
{
Console.WriteLine($"Font Name: {e.FontName}");
};AddHandler textControl.AdaptFont,
Sub(sender, e)
Console.WriteLine($"Font Name: {e.FontName}")
End SubMembers
Properties
| Property | Description |
|---|---|
| AdaptedFontName | 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. |
| FontName | Gets the name of the original font which must be adapted. |
| SupportedFonts | Gets a list of all fonts currently supported. |