Back to Devexpress

UnderlineType Enum

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

latest4.4 KB
Original Source

UnderlineType Enum

Lists underline styles.

Namespace : DevExpress.XtraRichEdit.API.Native

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

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
[ComVisible(true)]
public enum UnderlineType
vb
<ComVisible(True)>
Public Enum UnderlineType

Members

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 properties accept/return UnderlineType values:

Remarks

Use the CharacterPropertiesBase.Underline property to specify the underline style for characters and the CharacterPropertiesBase.UnderlineColor to specify the color.

Example

View Example

csharp
Document document = server.Document;
document.BeginUpdate();
document.AppendText("Normal\nFormatted\nNormal");
document.EndUpdate();
DocumentRange range = document.Paragraphs[1].Range;
CharacterProperties cp = document.BeginUpdateCharacters(range);
cp.FontName = "Comic Sans MS";
cp.FontSize = 18;
cp.ForeColor = Color.Blue;
cp.BackColor = Color.Snow;
cp.Underline = UnderlineType.DoubleWave;
cp.UnderlineColor = Color.Red;
document.EndUpdateCharacters(cp);
vb
Dim document As Document = server.Document
document.BeginUpdate()
document.AppendText("Normal" & vbLf & "Formatted" & vbLf & "Normal")
document.EndUpdate()
Dim range As DocumentRange = document.Paragraphs(1).Range
Dim cp As CharacterProperties = document.BeginUpdateCharacters(range)
cp.FontName = "Comic Sans MS"
cp.FontSize = 18
cp.ForeColor = Color.Blue
cp.BackColor = Color.Snow
cp.Underline = UnderlineType.DoubleWave
cp.UnderlineColor = Color.Red
document.EndUpdateCharacters(cp)

See Also

Underline

UnderlineColor

ToggleFontUnderline

ToggleFontDoubleUnderlineCommand

ShowFontForm

DevExpress.XtraRichEdit.API.Native Namespace