TX Text Control .NET for WPF

MaxLevel Field

Field
Namespace
TXTextControl
Package
TXTextControl.TextControl.WPF.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

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;
}