Back to Devexpress

SubDocument.Paragraphs Property

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-subdocument-c07274a8.md

latest6.7 KB
Original Source

SubDocument.Paragraphs Property

Provides access to a collection of paragraphs.

Namespace : DevExpress.XtraRichEdit.API.Native

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

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
ParagraphCollection Paragraphs { get; }
vb
ReadOnly Property Paragraphs As ParagraphCollection

Property Value

TypeDescription
ParagraphCollection

A ParagraphCollection interface defining a list of paragraphs.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the Paragraphs property.

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#L35

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

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

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

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

csharp
// Access the collection of paragraphs.
ParagraphCollection paragraphs = document.Paragraphs;

winforms-richedit-syntax-highlighting-with-devexpress-codeparser-library/CS/WindowsFormsApplication1/SyntaxHighlighting.cs#L76

csharp
return null;
int paragraphStart = DocumentHelper.GetParagraphStart(syntaxEditor.Document.Paragraphs[token.Range.Start.Line - 1]);
int tokenStart = paragraphStart + token.Range.Start.Offset - 1;

syntax-highlighting-for-c-and-vb-code-using-devexpress-codeparser-and-syntax-highlight-tokens/CS/SyntaxHighlightSimple/MainWindow.xaml.cs#L103

csharp
return null;
int paragraphStart = DocumentHelper.GetParagraphStart(syntaxEditor.Document.Paragraphs[token.Range.Start.Line - 1]);
int tokenStart = paragraphStart + token.Range.Start.Offset - 1;

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

vb
' Add paragraphs to the list
Dim paragraphs As DevExpress.XtraRichEdit.API.Native.ParagraphCollection = document.Paragraphs
paragraphs.AddParagraphsToList(document.Range, bulletedList, 0)

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

vb
' Add paragraphs to the list
Dim paragraphs As ParagraphCollection = document.Paragraphs
paragraphs.AddParagraphsToList(document.Range, bulletedList, 0)

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

vb
' Access the collection of paragraphs.
Dim paragraphs As DevExpress.XtraRichEdit.API.Native.ParagraphCollection = document.Paragraphs
' Apply the numbering list format to the document paragraphs.

winforms-richedit-syntax-highlighting-with-devexpress-codeparser-library/VB/WindowsFormsApplication1/SyntaxHighlighting.vb#L76

vb
If syntaxEditor.Document.Paragraphs.Count < token.Range.Start.Line Then Return Nothing
Dim paragraphStart As Integer = DocumentHelper.GetParagraphStart(syntaxEditor.Document.Paragraphs(token.Range.Start.Line - 1))
Dim tokenStart As Integer = paragraphStart + token.Range.Start.Offset - 1

syntax-highlighting-for-c-and-vb-code-using-devexpress-codeparser-and-syntax-highlight-tokens/VB/SyntaxHighlightSimple/MainWindow.xaml.vb#L98

vb
If syntaxEditor.Document.Paragraphs.Count < token.Range.Start.Line Then Return Nothing
Dim paragraphStart As Integer = DocumentHelper.GetParagraphStart(syntaxEditor.Document.Paragraphs(token.Range.Start.Line - 1))
Dim tokenStart As Integer = paragraphStart + token.Range.Start.Offset - 1

See Also

Insert

SubDocument Interface

SubDocument Members

DevExpress.XtraRichEdit.API.Native Namespace