# ListFormat.MaxLevel Field

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

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Field
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl > ListFormat.MaxLevel Field
- **466 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/listformat/maxlevel-field/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/listformat/maxlevel-field/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/listformat/maxlevel-field/llms-full.txt

---

### Description

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

### Syntax

```csharp
public const int MaxLevel = 10;
```

```vbnet
Public Const MaxLevel As Integer = 10
```

### Examples

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

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

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

```vbnet
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
```

---

## Nearby

- **Previous:** [ListFormat.Level Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/listformat/level-property/llms-full.txt)
- **Next:** [ListFormat.MaxText Field](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/listformat/maxtext-field/llms-full.txt)
