Underline Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Gets or sets underlining styles for the style.
Syntax
public FontUnderlineStyle Underline { get; set; }Public Property Underline As FontUnderlineStyleMembers
| Value | Description |
|---|---|
| None | Text is not underlined. |
| Single | Text is underlined with a single line. |
| Doubled | Text is underlined with a doubled line. |
| SingleWordsOnly | Only the words of the text are underlined with a single line. |
| DoubledWordsOnly | Only the words of the text are underlined with a doubled line. |
Examples
The following example creates a reusable emphasis style and adds it to the document by using FormattingStyle.Underline.
FormattingStyle formattingStyle = new InlineStyle("Emphasis");
formattingStyle.Underline = FontUnderlineStyle.DoubledWordsOnly;
Console.WriteLine($"Underline used by Formatting Style: {formattingStyle.Underline}");
textControl.InlineStyles.Add((InlineStyle)formattingStyle);Dim formattingStyle As FormattingStyle = New InlineStyle("Emphasis")
formattingStyle.Underline = FontUnderlineStyle.DoubledWordsOnly
Console.WriteLine($"Underline used by Formatting Style: {formattingStyle.Underline}")
textControl.InlineStyles.Add(DirectCast(formattingStyle, InlineStyle))