Back to Devexpress

CharacterStyle.Name Property

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-characterstyle-79d7d84d.md

latest4.8 KB
Original Source

CharacterStyle.Name Property

Gets or sets the name of the style.

Namespace : DevExpress.XtraRichEdit.API.Native

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

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
string Name { get; set; }
vb
Property Name As String

Property Value

TypeDescription
String

A string specifying the style name.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the Name 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#L20

csharp
cstyle = document.CharacterStyles.CreateNew();
cstyle.Name = "MyCStyle";
cstyle.Parent = document.CharacterStyles["Default Paragraph Font"];

wpf-richedit-document-api/CS/DXRichEditControlAPISample/CodeExamples/StylesActions.cs#L20

csharp
cstyle = document.CharacterStyles.CreateNew();
cstyle.Name = "MyCStyle";
cstyle.Parent = document.CharacterStyles["Default Paragraph Font"];

winforms-rich-edit-text-formatting/CS/Text Formatting Example/Form1.cs#L145

csharp
CharacterStyle annotationCharStyle = document.CharacterStyles.CreateNew();
annotationCharStyle.Name = "AnnotationChar";
document.CharacterStyles.Add(annotationCharStyle);

word-document-api-examples/CS/CodeExamples/StylesActions.cs#L34

csharp
cstyle = document.CharacterStyles.CreateNew();
cstyle.Name = "MyCStyle";
cstyle.Parent = document.CharacterStyles["Default Paragraph Font"];

winforms-richedit-document-api/VB/RichEditAPISample/CodeExamples/Styles.vb#L18

vb
cstyle = document.CharacterStyles.CreateNew()
cstyle.Name = "MyCStyle"
cstyle.Parent = document.CharacterStyles("Default Paragraph Font")

wpf-richedit-document-api/VB/DXRichEditControlAPISample/CodeExamples/StylesActions.vb#L16

vb
cstyle = document.CharacterStyles.CreateNew()
cstyle.Name = "MyCStyle"
cstyle.Parent = document.CharacterStyles("Default Paragraph Font")

word-document-api-examples/VB/CodeExamples/StylesActions.vb#L31

vb
cstyle = document.CharacterStyles.CreateNew()
cstyle.Name = "MyCStyle"
cstyle.Parent = document.CharacterStyles("Default Paragraph Font")

winforms-rich-edit-text-formatting/VB/Text Formatting Example/Form1.vb#L137

vb
Dim annotationCharStyle As CharacterStyle = document.CharacterStyles.CreateNew()
annotationCharStyle.Name = "AnnotationChar"
document.CharacterStyles.Add(annotationCharStyle)

See Also

CharacterStyle Interface

CharacterStyle Members

DevExpress.XtraRichEdit.API.Native Namespace