officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-characterstyle.md
Gets or sets the style form which the current style inherits.
Namespace : DevExpress.XtraRichEdit.API.Native
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
CharacterStyle Parent { get; set; }
Property Parent As CharacterStyle
| Type | Description |
|---|---|
| CharacterStyle |
A CharacterStyle object representing the parent style.
|
When creating a new style, you do not have to specify all formatting properties. Instead you can specify the parent style and change only the required properties.
The following code snippets (auto-collected from DevExpress Examples) contain references to the Parent property.
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.
winforms-richedit-document-api/CS/RichEditAPISample/CodeExamples/Styles.cs#L21
cstyle.Name = "MyCStyle";
cstyle.Parent = document.CharacterStyles["Default Paragraph Font"];
cstyle.ForeColor = System.Drawing.Color.DarkOrange;
wpf-richedit-document-api/CS/DXRichEditControlAPISample/CodeExamples/StylesActions.cs#L21
cstyle.Name = "MyCStyle";
cstyle.Parent = document.CharacterStyles["Default Paragraph Font"];
cstyle.ForeColor = System.Drawing.Color.DarkOrange;
word-document-api-examples/CS/CodeExamples/StylesActions.cs#L35
cstyle.Name = "MyCStyle";
cstyle.Parent = document.CharacterStyles["Default Paragraph Font"];
cstyle.ForeColor = System.Drawing.Color.DarkOrange;
winforms-richedit-document-api/VB/RichEditAPISample/CodeExamples/Styles.vb#L19
cstyle.Name = "MyCStyle"
cstyle.Parent = document.CharacterStyles("Default Paragraph Font")
cstyle.ForeColor = System.Drawing.Color.DarkOrange
wpf-richedit-document-api/VB/DXRichEditControlAPISample/CodeExamples/StylesActions.vb#L17
cstyle.Name = "MyCStyle"
cstyle.Parent = document.CharacterStyles("Default Paragraph Font")
cstyle.ForeColor = System.Drawing.Color.DarkOrange
word-document-api-examples/VB/CodeExamples/StylesActions.vb#L32
cstyle.Name = "MyCStyle"
cstyle.Parent = document.CharacterStyles("Default Paragraph Font")
cstyle.ForeColor = System.Drawing.Color.DarkOrange
See Also