MaxLevel Field
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. Core. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesCore. dll
- Also in
TXTextControl.asTextControl. ASP. SDK 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;Public Const MaxLevel As Integer = 10Examples
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;
}Dim listFormat As ListFormat = textControl.Selection.ListFormat
Dim requestedLevel As Integer = listFormat.Level + 1
If requestedLevel <= ListFormat.MaxLevel Then
listFormat.Level = requestedLevel
textControl.Selection.ListFormat = listFormat
End If