Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

Document.DefaultParagraphProperties Property

Provides access to default paragraph formatting for the current document.

Namespace: DevExpress.XtraRichEdit.API.Native

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

NuGet Package: DevExpress.RichEdit.Core

#Declaration

ParagraphPropertiesBase DefaultParagraphProperties { get; }

#Property Value

Type Description
ParagraphPropertiesBase

A ParagraphPropertiesBase interface that enables you to specify paragraph properties.

#Example

The following code snippet illustrates how to apply default character and paragraph formatting to a newly created document. The RichEditControl.EmptyDocumentCreated event is handled and the Document.DefaultParagraphProperties and Document.DefaultCharacterProperties settings are modified.

View Example

Private Sub RichEditControl1_EmptyDocumentCreated(ByVal sender As Object, ByVal e As EventArgs)
    richEditControl1.Document.DefaultCharacterProperties.ForeColor = Color.Red
    richEditControl1.Document.DefaultParagraphProperties.Alignment = DevExpress.XtraRichEdit.API.Native.ParagraphAlignment.Center
    richEditControl1.Document.AppendText("Document created at " & Date.Now.ToLongTimeString())
End Sub
See Also