Back to Devexpress

Paragraph.Style Property

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-paragraph.md

latest5.4 KB
Original Source

Paragraph.Style Property

Gets or sets the paragraph style applied to the current paragraph.

Namespace : DevExpress.XtraRichEdit.API.Native

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

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
public abstract ParagraphStyle Style { get; set; }
vb
Public MustOverride Property Style As ParagraphStyle

Property Value

TypeDescription
ParagraphStyle

A ParagraphStyle object representing the style.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the Style 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-rich-edit-text-formatting/CS/Text Formatting Example/Form1.cs#L118

csharp
{
    document.Paragraphs[i].Style = chapterStyle;
}

winforms-richedit-table-of-contents-practical-guide/CS/Form1.cs#L51

csharp
SearchForTOCEntries(delegate(DocumentPosition location, int level) {
    Document.Paragraphs.Get(location).Style = GetStyleForLevel(level);
});

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

csharp
}
document.Paragraphs[2].Style = pstyle;
#endregion #CreateNewParagraphStyle

word-processing-table-of-contents-practical-guide/CS/Program.cs#L43

csharp
SearchForTOCEntries(document, delegate (DocumentPosition location, int level) {
    document.Paragraphs.Get(location).Style = GetStyleForLevel(document, level);
});

wpf-richedit-document-api/CS/DXRichEditControlAPISample/CodeExamples/StylesActions.cs#L48

csharp
}
document.Paragraphs[2].Style = pstyle;
#endregion #CreateNewParagraphStyle

winforms-rich-edit-text-formatting/VB/Text Formatting Example/Form1.vb#L111

vb
If var.Contains("Chapter ") Then
    document.Paragraphs(i).Style = chapterStyle
End If

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

vb
Private Sub ApplyStyles()
    SearchForTOCEntries(Sub(ByVal location, ByVal level) Document.Paragraphs.Get(location).Style = GetStyleForLevel(level))
End Sub

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

vb
document.Paragraphs(CInt((2))).Style = pstyle
#End Region ' #CreateNewParagraphStyle

word-processing-table-of-contents-practical-guide/VB/Program.vb#L40

vb
SearchForTOCEntries(document, Sub(location, level)
                                  document.Paragraphs.[Get](location).Style = GetStyleForLevel(document, level)
                              End Sub)

wpf-richedit-document-api/VB/DXRichEditControlAPISample/CodeExamples/StylesActions.vb#L41

vb
End If
            document.Paragraphs(2).Style = pstyle
' #End Region ' #CreateNewParagraphStyle

See Also

Paragraph Class

Paragraph Members

DevExpress.XtraRichEdit.API.Native Namespace