officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-document-a07f1fe5.md
Provides access to a collection of paragraph styles in the current document.
Namespace : DevExpress.XtraRichEdit.API.Native
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
ParagraphStyleCollection ParagraphStyles { get; }
ReadOnly Property ParagraphStyles As ParagraphStyleCollection
| Type | Description |
|---|---|
| ParagraphStyleCollection |
A ParagraphStyleCollection collection containing paragraph styles.
|
The following code snippets (auto-collected from DevExpress Examples) contain references to the ParagraphStyles 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-table-of-contents-practical-guide/CS/Form1.cs#L109
Document.Paragraphs[0].Alignment = ParagraphAlignment.Center;
Document.Paragraphs[0].Style = Document.ParagraphStyles["Normal"];
Document.Paragraphs[0].OutlineLevel = 0;
word-processing-table-of-contents-practical-guide/CS/Program.cs#L143
paragraph.Alignment = ParagraphAlignment.Center;
paragraph.Style = document.ParagraphStyles["Normal"];
paragraph.OutlineLevel = 0;
winforms-richedit-document-api/CS/RichEditAPISample/CodeExamples/Styles.cs#L39
document.LoadDocument("Documents//Grimm.docx", DevExpress.XtraRichEdit.DocumentFormat.OpenXml);
ParagraphStyle pstyle = document.ParagraphStyles["MyPStyle"];
if (pstyle == null)
wpf-richedit-document-api/CS/DXRichEditControlAPISample/CodeExamples/StylesActions.cs#L39
document.LoadDocument("Documents//Grimm.docx", DevExpress.XtraRichEdit.DocumentFormat.OpenXml);
ParagraphStyle pstyle = document.ParagraphStyles["MyPStyle"];
if (pstyle == null)
winforms-rich-edit-text-formatting/CS/Text Formatting Example/Form1.cs#L128
#region #AnnotationStyle
ParagraphStyle annotationStyle = document.ParagraphStyles["Annotation"];
winforms-richedit-table-of-contents-practical-guide/VB/Form1.vb#L101
Document.Paragraphs(0).Alignment = ParagraphAlignment.Center
Document.Paragraphs(0).Style = Document.ParagraphStyles("Normal")
Document.Paragraphs(0).OutlineLevel = 0
word-processing-table-of-contents-practical-guide/VB/Program.vb#L139
paragraph.Alignment = ParagraphAlignment.Center
paragraph.Style = document.ParagraphStyles("Normal")
paragraph.OutlineLevel = 0
winforms-richedit-document-api/VB/RichEditAPISample/CodeExamples/Styles.vb#L36
document.LoadDocument("Documents//Grimm.docx", DevExpress.XtraRichEdit.DocumentFormat.OpenXml)
Dim pstyle As DevExpress.XtraRichEdit.API.Native.ParagraphStyle = document.ParagraphStyles("MyPStyle")
If pstyle Is Nothing Then
wpf-richedit-document-api/VB/DXRichEditControlAPISample/CodeExamples/StylesActions.vb#L33
document.LoadDocument("Documents//Grimm.docx", DevExpress.XtraRichEdit.DocumentFormat.OpenXml)
Dim pstyle As ParagraphStyle = document.ParagraphStyles("MyPStyle")
If pstyle Is Nothing Then
word-document-api-examples/VB/CodeExamples/StylesActions.vb#L58
' Access a paragraph style with the specified name.
Dim pstyle As DevExpress.XtraRichEdit.API.Native.ParagraphStyle = document.ParagraphStyles("MyPStyle")
' If the style with the specified name does not exist
See Also