Gets or sets the underline style at the current input position. If text is selected, the property specifies this attribute for the whole selected text. This property determines the style for the Underline property.

Syntax

public FontUnderlineStyle UnderlineStyle { get; set; }
Public Property UnderlineStyle() As FontUnderlineStyle

Members

Member 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 XAML example binds the UnderlineStyle property to the selected value of a combo box. The combo box is filled with all supported styles.

<ComboBox 
    Height="24" 
    Name="comboboxUnderlineStyle" 
    ItemsSource="{Binding ElementName=textControl1, Path=InputFormat.UnderlineStyles, Mode=OneTime}" 
    SelectedValue="{Binding ElementName=textControl1, Path=InputFormat.UnderlineStyle, Mode=TwoWay}"/>

Remarks

The property's default value is FontUnderlineStyle.Single.

The property returns FontUnderlineStyle.None, if the text selection has no common underline style.