TX Text Control .NET Server

MaxLevel Field

Field
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

Represents the maximum of levels for bulleted and numbered lists. The value of this constant is 10.

Syntax

public const int MaxLevel = 10;

Examples

The following example demotes a selected list item only when the requested nesting level is supported.

ListFormat listFormat = textControl.Selection.ListFormat;
int requestedLevel = listFormat.Level + 1;

if (requestedLevel <= ListFormat.MaxLevel)
{
    listFormat.Level = requestedLevel;
    textControl.Selection.ListFormat = listFormat;
}