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.v24.2.Core.dll
NuGet Package: DevExpress.RichEdit.Core
Declaration
Parameters
Name | Type | Description |
---|---|---|
mask | ParagraphPropertiesMask | A ParagraphPropertiesMask enumeration value. |
Remarks
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 to reset.
Example
The following code snippet modifies Alignment and FirstLineIndent properties. These properties are reset to Document.DefaultParagraphProperties values if no specific paragraph style is applied. Other paragraph properties remain unchanged.
using XtraRichEdit.API.Native;
using (var wordProcessor = new RichEditDocumentServer())
{
wordProcessor.LoadDocument("Grimm.docx");
Document document = wordProcessor.Document;
DocumentRange range = document.Paragraphs[0].Range;
// Set alignment and indentation of the first line
// in the first paragraph to default.
// Other paragraph properties remain intact.
ParagraphProperties cp = document.BeginUpdateParagraphs(range);
cp.Reset(ParagraphPropertiesMask.Alignment | ParagraphPropertiesMask.FirstLineIndent);
document.EndUpdateParagraphs(cp);
}
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the Reset(ParagraphPropertiesMask) method.
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.