TX Text Control .NET Server

FormatCharacter Property

Property
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 formatting character for a bulleted or numbered list.

Syntax

public ListFormatCharacter FormatCharacter { get; set; }

Members

ValueDescription
TabThe text of the list follows the bullet or number character at the next tab position.
SpaceThe text of the list follows the bullet or number character separated through a space character.
NoneThe text of the list immediately follows the bullet or number character.

Examples

The following example applies FormatCharacter while converting three selected paragraphs into a usable numbered list.

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

ListFormat listFormat = new()
{
    Type = ListType.Numbered,
    FormatCharacter = ListFormatCharacter.Space
};
textControl.Selection.ListFormat = listFormat;

Remarks

The property's default value is ListFormatCharacter.Tab.

The property returns its default value when the text selection contains multiple paragraphs with mixed formatting characters or when the text selection does not contain a bulleted or a numbered list. The Selection.IsCommonValueSelected method can be used to check for mixed attributes.