Back to Devexpress

CharacterPropertiesBase.UnderlineColor Property

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-characterpropertiesbase-d0604362.md

latest5.3 KB
Original Source

CharacterPropertiesBase.UnderlineColor Property

Gets or sets the color of the underline for the specified characters.

Namespace : DevExpress.XtraRichEdit.API.Native

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

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
Color? UnderlineColor { get; set; }
vb
Property UnderlineColor As Color?

Property Value

TypeDescription
Nullable<Color>

A Color value or null , for a mixture of underline colors.

|

Remarks

Important

The semi-transparent alpha component (i.e. the Color’s alpha parameter set to value less than 255) is reset to opaque (255) during export to all formats except PDF.

The following code snippets (auto-collected from DevExpress Examples) contain references to the UnderlineColor 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/Formatting.cs#L27

csharp
cp.Underline = UnderlineType.DoubleWave;
cp.UnderlineColor = Color.Red;

wpf-richedit-document-api/CS/DXRichEditControlAPISample/CodeExamples/FormattingActions.cs#L22

csharp
cp.Underline = UnderlineType.DoubleWave;
cp.UnderlineColor = Color.Red;
document.EndUpdateCharacters(cp);

word-document-api-examples/CS/CodeExamples/FormattingActions.cs#L45

csharp
cp.Underline = UnderlineType.DoubleWave;
cp.UnderlineColor = Color.Red;
cp.SmallCaps = true;

reporting-winforms-change-formatting-xrrichtext-rtf-content/CS/XtraReport1.cs#L59

csharp
cp.Underline = UnderlineType.Single;
cp.UnderlineColor = Color.Red;
server.Document.EndUpdateCharacters(cp);

winforms-richedit-document-api/VB/RichEditAPISample/CodeExamples/Formatting.vb#L25

vb
cp.Underline = DevExpress.XtraRichEdit.API.Native.UnderlineType.DoubleWave
cp.UnderlineColor = System.Drawing.Color.Red
' Finalize modifications

wpf-richedit-document-api/VB/DXRichEditControlAPISample/CodeExamples/FormattingActions.vb#L19

vb
cp.Underline = UnderlineType.DoubleWave
cp.UnderlineColor = Color.Red
document.EndUpdateCharacters(cp)

word-document-api-examples/VB/CodeExamples/FormattingActions.vb#L40

vb
cp.Underline = DevExpress.XtraRichEdit.API.Native.UnderlineType.DoubleWave
cp.UnderlineColor = System.Drawing.Color.Red
' Finalize to modify character formatting.

reporting-winforms-change-formatting-xrrichtext-rtf-content/VB/XtraReport1.vb#L63

vb
cp.Underline = UnderlineType.Single
cp.UnderlineColor = Color.Red
server.Document.EndUpdateCharacters(cp)

See Also

ShowFontFormCommand

Underline

CharacterPropertiesBase Interface

CharacterPropertiesBase Members

DevExpress.XtraRichEdit.API.Native Namespace