CharacterPropertiesBase.Reset(CharacterPropertiesMask) Method
Resets the character formatting properties specified by the mask to the properties of the underlying character style or to default properties.
Namespace: DevExpress.XtraRichEdit.API.Native
Assembly: DevExpress.RichEdit.v18.2.Core.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
mask | CharacterPropertiesMask | A CharacterPropertiesMask enumeration value. |
Remarks
The Reset sets character properties to the underlying style (or the default style, if the style is not applied). The mask allows you to specify character properties which will be reset.
The following code snippet modifies CharacterPropertiesBase.FontSize and CharacterPropertiesBase.FontName properties. These properties are reset to Document.DefaultCharacterProperties values if no specific character style is applied. Other character properties remain unchanged.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/winforms-richedit-document-api-e5219
document.LoadDocument("Grimm.docx", DevExpress.XtraRichEdit.DocumentFormat.OpenXml)
' Set font size and font name of the characters in the first paragraph to default.
' Other character properties remain intact.
Dim range As DocumentRange = document.Paragraphs(0).Range
Dim cp As CharacterProperties = document.BeginUpdateCharacters(range)
cp.Reset(CharacterPropertiesMask.FontSize Or CharacterPropertiesMask.FontName)
document.EndUpdateCharacters(cp)
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the Reset(CharacterPropertiesMask) 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.