Skip to main content

ParagraphPropertiesBase Interface

Serves as the base for the ParagraphProperties interface, providing access to paragraph properties.

Namespace: DevExpress.XtraRichEdit.API.Native

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

#Declaration

[ComVisible(true)]
public interface ParagraphPropertiesBase

#Returned By

Properties that return ParagraphPropertiesBase instances:

#Remarks

The ParagraphPropertiesBase interface allows you to get/set paragraph characteristics.

Use the SubDocument.BeginUpdateParagraphs and the SubDocument.EndUpdateParagraphs paired methods to modify paragraph formatting, such as the ParagraphPropertiesBase.LineSpacing, Paragraph.Alignment, Paragraph.SpacingBefore etc.

To accomplish this, call the SubDocument.BeginUpdateParagraphs method for the specified range, modify the properties of the returned ParagraphProperties object and call the SubDocument.EndUpdateParagraphs method to finalize the modification.

The following code snippet changes the first line indent and the line spacing of the paragraph containing the selection.

using DevExpress.XtraRichEdit.API.Native;
// ...
    Document doc = rich.Document;
    ParagraphProperties parProperties = doc.BeginUpdateParagraphs(doc.Selection);
    // Specifies the first line hanging by 0.5 inches (150 default document units)
    parProperties.FirstLineIndentType = ParagraphFirstLineIndent.Hanging;
    parProperties.FirstLineIndent = 150f;
    // Specifies triple spacing
    parProperties.LineSpacingType = ParagraphLineSpacing.Multiple;
    parProperties.LineSpacingMultiplier = 3;
    doc.EndUpdateParagraphs(parProperties);
See Also