Back to Devexpress

CharacterProperties.Style Property

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-characterproperties.md

latest4.9 KB
Original Source

CharacterProperties.Style Property

Gets or sets the character style applied to the document range.

Namespace : DevExpress.XtraRichEdit.API.Native

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

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
CharacterStyle Style { get; set; }
vb
Property Style As CharacterStyle

Property Value

TypeDescription
CharacterStyle

A CharacterStyle object representing the style.

|

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

csharp
document.BeginUpdateCharacters(myRange);
charProps.Style = cstyle;
document.EndUpdateCharacters(charProps);

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

csharp
CharacterProperties annotationProperties = document.BeginUpdateCharacters(document.Paragraphs[2].Range);
annotationProperties.Style = annotationCharStyle;
document.EndUpdateCharacters(annotationProperties);

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

csharp
document.BeginUpdateCharacters(myRange);
charProps.Style = cstyle;
document.EndUpdateCharacters(charProps);

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

csharp
// Apply the created character style to the target range.
charProps.Style = cstyle;

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

vb
Dim charProps As DevExpress.XtraRichEdit.API.Native.CharacterProperties = document.BeginUpdateCharacters(myRange)
charProps.Style = cstyle
document.EndUpdateCharacters(charProps)

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

vb
Dim annotationProperties As CharacterProperties = document.BeginUpdateCharacters(document.Paragraphs(2).Range)
annotationProperties.Style = annotationCharStyle
document.EndUpdateCharacters(annotationProperties)

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

vb
Dim charProps As CharacterProperties = document.BeginUpdateCharacters(myRange)
charProps.Style = cstyle
document.EndUpdateCharacters(charProps)

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

vb
' Apply the created character style to the target range.
charProps.Style = cstyle
' Finalize to modify character formatting.

See Also

CharacterProperties Interface

CharacterProperties Members

DevExpress.XtraRichEdit.API.Native Namespace