Back to Devexpress

CharacterPropertiesBase.Underline Property

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

latest6.9 KB
Original Source

CharacterPropertiesBase.Underline Property

Gets or sets the type of underline applied to the character(s).

Namespace : DevExpress.XtraRichEdit.API.Native

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

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
UnderlineType? Underline { get; set; }
vb
Property Underline As UnderlineType?

Property Value

TypeDescription
Nullable<UnderlineType>

An UnderlineType enumeration value or null , for a mixture of underline types.

|

Available values:

Show 18 items

NameDescription
None

Indicates that the text is not underlined.

| | Single |

Specifies a single underline.

| | Dotted |

Specifies a dotted underline.

| | Dashed |

Specifies a dashed underline.

| | DashDotted |

Specifies a dash-dotted underline.

| | DashDotDotted |

Specifies a dash-dot-dotted underline.

| | Double |

Specifies a double underline.

| | HeavyWave |

Specifies a heavy wave underline.

| | LongDashed |

Specifies a long-dashed underline.

| | ThickSingle |

Specifies a thick single underline.

| | ThickDotted |

Specifies a thick dotted underline.

| | ThickDashed |

Specifies a thick dashed underline.

| | ThickDashDotted |

Specifies a thick dash-dotted underline.

| | ThickDashDotDotted |

Specifies a thick dash-dot-dotted underline.

| | ThickLongDashed |

Specifies a thick long-dashed underline.

| | DoubleWave |

Specifies a double wave underline.

| | Wave |

Specifies a wave underline.

| | UnderlineWordsOnly |

Specifies an underline that is a single line below all non-space characters. Other characters are not underlined.

|

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

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

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

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

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

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

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

csharp
cp.ForeColor = Color.Red;
cp.Underline = UnderlineType.Single;
cp.UnderlineColor = Color.Red;

winforms-spreadsheet-how-to-edit-rich-text/VB/SpreadsheetRichText/RichTextEditForm.vb#L37

vb
Case DevExpress.Spreadsheet.UnderlineType.Single
    cp.Underline = DevExpress.XtraRichEdit.API.Native.UnderlineType.Single
Case DevExpress.Spreadsheet.UnderlineType.Double

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

vb
cp.BackColor = System.Drawing.Color.Snow
cp.Underline = DevExpress.XtraRichEdit.API.Native.UnderlineType.DoubleWave
cp.UnderlineColor = System.Drawing.Color.Red

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

vb
cp.BackColor = Color.Snow
cp.Underline = UnderlineType.DoubleWave
cp.UnderlineColor = Color.Red

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

vb
cp.BackColor = System.Drawing.Color.Snow
cp.Underline = DevExpress.XtraRichEdit.API.Native.UnderlineType.DoubleWave
cp.UnderlineColor = System.Drawing.Color.Red

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

vb
cp.ForeColor = Color.Red
cp.Underline = UnderlineType.Single
cp.UnderlineColor = Color.Red

See Also

ToggleFontUnderlineCommand

ToggleFontDoubleUnderlineCommand

UnderlineColor

ShowFontFormCommand

CharacterPropertiesBase Interface

CharacterPropertiesBase Members

DevExpress.XtraRichEdit.API.Native Namespace