Back to Devexpress

ParagraphCollection.AddParagraphsToList(DocumentRange, NumberingList, Int32) Method

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-paragraphcollection-dot-addparagraphstolist-x28-documentrange-numberinglist-int32-x29.md

latest5.1 KB
Original Source

ParagraphCollection.AddParagraphsToList(DocumentRange, NumberingList, Int32) Method

Apply the numbering list format specified by the NumberingList object to the paragraphs in the specified range.

Namespace : DevExpress.XtraRichEdit.API.Native

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

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
void AddParagraphsToList(
    DocumentRange range,
    NumberingList list,
    int levelIndex
)
vb
Sub AddParagraphsToList(
    range As DocumentRange,
    list As NumberingList,
    levelIndex As Integer
)

Parameters

NameTypeDescription
rangeDocumentRange

A DocumentRange specifying the range for which the encompassing paragraphs are obtained.

| | list | NumberingList |

A NumberingList object that holds list format attributes.

| | levelIndex | Int32 |

An integer that is the list level applied to the paragraphs specified by the document range.

|

Remarks

;

The following code snippets (auto-collected from DevExpress Examples) contain references to the AddParagraphsToList(DocumentRange, NumberingList, Int32) 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.

winforms-richedit-document-api/CS/RichEditAPISample/CodeExamples/List.cs#L36

csharp
ParagraphCollection paragraphs = document.Paragraphs;
paragraphs.AddParagraphsToList(document.Range, bulletedList, 0);

wpf-richedit-document-api/CS/DXRichEditControlAPISample/CodeExamples/ListActions.cs#L36

csharp
ParagraphCollection paragraphs = document.Paragraphs;
paragraphs.AddParagraphsToList(document.Range, bulletedList, 0);

word-document-api-examples/CS/CodeExamples/ListsActions.cs#L52

csharp
// Apply the numbering list format to the document paragraphs.
paragraphs.AddParagraphsToList(document.Range, bulletedList, 0);

winforms-richedit-document-api/VB/RichEditAPISample/CodeExamples/List.vb#L30

vb
Dim paragraphs As DevExpress.XtraRichEdit.API.Native.ParagraphCollection = document.Paragraphs
paragraphs.AddParagraphsToList(document.Range, bulletedList, 0)
document.EndUpdate()

wpf-richedit-document-api/VB/DXRichEditControlAPISample/CodeExamples/ListActions.vb#L33

vb
Dim paragraphs As ParagraphCollection = document.Paragraphs
paragraphs.AddParagraphsToList(document.Range, bulletedList, 0)

word-document-api-examples/VB/CodeExamples/ListsActions.vb#L44

vb
' Apply the numbering list format to the document paragraphs.
paragraphs.AddParagraphsToList(document.Range, bulletedList, 0)
' Finalize to edit the document.

See Also

ParagraphCollection Interface

ParagraphCollection Members

DevExpress.XtraRichEdit.API.Native Namespace