OverrideListLevel.SetOverrideStart(Boolean) Method
Specifies whether to override the level’s starting number.
Namespace: DevExpress.XtraRichEdit.API.Native
Assembly: DevExpress.RichEdit.v22.2.Core.dll
NuGet Package: DevExpress.RichEdit.Core
Declaration
Parameters
Name | Type | Description |
---|---|---|
value | Boolean | true, to override the level’s starting number; otherwise, false. |
Remarks
The code sample below shows how to create two lists based on the same pattern, but with different starting numbers.
document.BeginUpdate();
// Create a new list pattern object
AbstractNumberingList list = document.AbstractNumberingLists.Add();
// Specify the list's type
list.NumberingType = NumberingType.Simple;
ListLevel level = list.Levels[0];
level.Start = 1;
level.NumberingFormat = NumberingFormat.UpperRoman;
level.DisplayFormatString = "{0}.";
// Create new list objects based on the specified pattern
NumberingList bulletedList = document.NumberingLists.Add(0);
NumberingList overrideList = document.NumberingLists.Add(0);
// Change the start number for the second list
overrideList.Levels[0].SetOverrideStart(true);
overrideList.Levels[0].NewStart = 3;
document.EndUpdate();
// Add paragraphs from the target range to the first list
DocumentRange range = document.CreateRange(document.Paragraphs[0].Range.Start,document.Paragraphs[3].Range.End.ToInt() - document.Paragraphs[0].Range.Start.ToInt());
document.Paragraphs.AddParagraphsToList(range, bulletedList,0);
// Add paragraphs from the target range to the second list
DocumentRange range2 = document.CreateRange(document.Paragraphs[5].Range.Start, document.Paragraphs[7].Range.End.ToInt() - document.Paragraphs[4].Range.Start.ToInt());
document.Paragraphs.AddParagraphsToList(range2, overrideList, 0);
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SetOverrideStart(Boolean) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.