TX Text Control .NET Server

CharBeforeNumber Property

PropertyDeprecated
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

Obsolete. Gets or sets a character that is displayed in front of the number in a numbered list. If this property is zero, no additional character is diplayed in front of the number character. This property is obsolete and only available for compatibility. A new application should use the TextBeforeNumber property.

Syntax

public char CharBeforeNumber { get; set; }

Examples

The following example applies CharBeforeNumber 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,
    CharBeforeNumber = '('
};
textControl.Selection.ListFormat = listFormat;

Remarks

The property returns 0 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.