Back to Devexpress

Document.ParagraphStyles Property

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-document-a07f1fe5.md

latest6.0 KB
Original Source

Document.ParagraphStyles Property

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

Declaration

csharp
ParagraphStyleCollection ParagraphStyles { get; }
vb
ReadOnly Property ParagraphStyles As ParagraphStyleCollection

Property Value

TypeDescription
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

csharp
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

csharp
paragraph.Alignment = ParagraphAlignment.Center;
paragraph.Style = document.ParagraphStyles["Normal"];
paragraph.OutlineLevel = 0;

winforms-richedit-document-api/CS/RichEditAPISample/CodeExamples/Styles.cs#L39

csharp
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

csharp
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

csharp
#region #AnnotationStyle
ParagraphStyle annotationStyle = document.ParagraphStyles["Annotation"];

winforms-richedit-table-of-contents-practical-guide/VB/Form1.vb#L101

vb
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

vb
paragraph.Alignment = ParagraphAlignment.Center
paragraph.Style = document.ParagraphStyles("Normal")
paragraph.OutlineLevel = 0

winforms-richedit-document-api/VB/RichEditAPISample/CodeExamples/Styles.vb#L36

vb
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

vb
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

vb
' 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

Document Interface

Document Members

DevExpress.XtraRichEdit.API.Native Namespace