AbstractNumberingList Interface
Abstract numbering definition that defines the appearance and behavior of numbered paragraphs in a document.
Namespace: DevExpress.XtraRichEdit.API.Native
Assembly: DevExpress.RichEdit.v18.2.Core.dll
Declaration
Related API Members
The following members return AbstractNumberingList objects:
Remarks
This construct is abstract, and therefore not directly referenced by document content. It is instead inherited by a NumberingList instance, which itself is referenced by the document content. Use the AbstractNumberingListCollection.Add method to create an abstract numbering list definition. Use the NumberingListCollection.Add method with the index of the abstract numbering list as a parameter to create a numbered list definition that can be applied to paragraphs in the document.
The following code snippets illustrate the creation of bulleted and numbered list definitions in the document.
Bulleted List
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-apply-different-list-types-to-certain-paragraphs-dynamically-e3791.
document.BeginUpdate();
// Bulleted list
AbstractNumberingList abstractListBulleted = document.AbstractNumberingLists.Add();
abstractListBulleted.NumberingType = NumberingType.Bullet;
ListLevel level = abstractListBulleted.Levels[0];
level.ParagraphProperties.LeftIndent = 150;
level.ParagraphProperties.FirstLineIndentType = ParagraphFirstLineIndent.Hanging;
level.ParagraphProperties.FirstLineIndent = 75;
level.CharacterProperties.FontName = "Symbol";
level.DisplayFormatString = new string('\u00B7', 1);
document.EndUpdate();
Numbered List
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-apply-different-list-types-to-certain-paragraphs-dynamically-e3791.
document.BeginUpdate();
// Numbered list with roman format
AbstractNumberingList abstractListNumberingRoman = document.AbstractNumberingLists.Add();
abstractListNumberingRoman.NumberingType = NumberingType.Simple;
level = abstractListNumberingRoman.Levels[0];
level.ParagraphProperties.LeftIndent = 150;
level.ParagraphProperties.FirstLineIndentType = ParagraphFirstLineIndent.Hanging;
level.ParagraphProperties.FirstLineIndent = 75;
level.Start = 1;
level.NumberingFormat = NumberingFormat.UpperRoman;
level.DisplayFormatString = "{0}.";
document.EndUpdate();