.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

NumberingListBase.Levels Property

Provides access to a collection of list levels.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v20.2.Core.dll


ReadOnlyListLevelCollection<ListLevel> Levels { get; }
ReadOnly Property Levels As ReadOnlyListLevelCollection(Of ListLevel)

Property Value

Type Description

A DevExpress.XtraRichEdit.API.Native.ReadOnlyListLevelCollection<T> collection of level definitions.


The list levels' collection contains 9 items regardless of the list type. The ListLevel class represents a list level.

The ListLevelProperties.DisplayFormatString property defines a format string for a list item's marker. Specify the ListLevelProperties.NumberingFormat property to define the number format for the marker.

The ListLevel.CharacterProperties and ListLevel.ParagraphProperties properties provide access to the format options.

Document document = server.Document;

// Create a new list pattern object
AbstractNumberingList list = document.AbstractNumberingLists.Add();

//Specify the list's type
list.NumberingType = NumberingType.Bullet;
ListLevel level = list.Levels[0];

//Set the left indent of the list
level.ParagraphProperties.LeftIndent = 100;

//Specify the bullets' format
//Without this step, the list is considered as numbered
level.DisplayFormatString = "\u00B7";
level.CharacterProperties.FontName = "Symbol";

//Create a new list based on the specific pattern
NumberingList bulletedList = document.NumberingLists.Add(0);

// Add paragraphs to the list
ParagraphCollection paragraphs = document.Paragraphs;
paragraphs.AddParagraphsToList(document.Range, bulletedList, 0);

See Also