TX Text Control .NET Server

Underline Property

Property
Namespace
TXTextControl
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.dll

Description

Gets or sets underlining styles for the selected text.

Syntax

public FontUnderlineStyle Underline { get; set; }

Members

ValueDescription
NoneText is not underlined.
SingleText is underlined with a single line.
DoubledText is underlined with a doubled line.
SingleWordsOnlyOnly the words of the text are underlined with a single line.
DoubledWordsOnlyOnly the words of the text are underlined with a doubled line.

Examples

The following example formats the heading of a short document by using Selection.Underline.

textControl.Text = "Quarterly results\nRevenue increased by 12%.";
textControl.Select(0, 17);
Selection selection = textControl.Selection;

selection.Underline = FontUnderlineStyle.DoubledWordsOnly;
Console.WriteLine($"Underline used by Selection: {selection.Underline}");

Limitations

Runtime only.

Remarks

The property's default value is FontUnderlineStyle.None.

The property returns its default value when the text selection contains multiple characters with mixed styles. The Selection.IsCommonValueSelected method can be used to check for mixed attributes.

Further Reading

  • Word Processing Basics: Using Style Sheets –