TX Text Control .NET Server

FontName Property

Property|Introduced in 23.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.dll

Description

Gets or sets the font used for the bullet character. When a new bullet character is set without specifying a font, the Windows Symbol font is assumed.

Syntax

public string FontName { get; set; }

Examples

The following example applies FontName while converting three selected paragraphs into a usable bulleted list.

textControl.Text = "Research\nDraft\nReview";
textControl.Select(0, textControl.Text.Length);

ListFormat listFormat = new()
{
    Type = ListType.Bulleted,
    FontName = "Arial"
};
textControl.Selection.ListFormat = listFormat;

Remarks

The property returns an empty string when the text selection contains multiple paragraphs with mixed settings or when the text selection does not contain a numbered list. The Selection.IsCommonValueSelected method can be used to check for mixed attributes.