.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

ParagraphPropertiesBase.Reset(ParagraphPropertiesMask) Method

Resets the paragraph formatting properties specified by the mask to the properties of the underlying paragraph style or to default properties.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v21.1.Core.dll


void Reset(
    ParagraphPropertiesMask mask


Name Type Description
mask ParagraphPropertiesMask

A ParagraphPropertiesMask enumeration value.


The Reset sets paragraph properties to the underlying style (or the default style, if the style is not applied). The mask allows you to specify paragraph properties which will be reset.

The following code snippet modifies ParagraphPropertiesBase.Alignment and ParagraphPropertiesBase.FirstLineIndent properties. These properties are reset to Document.DefaultParagraphProperties values if no specific paragraph style is applied. Other paragraph properties remain unchanged.

document.LoadDocument("Grimm.docx", DevExpress.XtraRichEdit.DocumentFormat.OpenXml);
// Set alignment and indentation of the first line in the first paragraph to default. 
// Other paragraph properties remain intact.
DocumentRange range = document.Paragraphs[0].Range;
ParagraphProperties cp = document.BeginUpdateParagraphs(range);
cp.Reset(ParagraphPropertiesMask.Alignment | ParagraphPropertiesMask.FirstLineIndent);
See Also