# InputFormat.UnderlineStyles Property

> Returns an array of all supported underline styles. This property can be used to fill a combo box or a menu.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 16.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET Server > Reference > TXTextControl > InputFormat.UnderlineStyles Property
- **846 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/inputformat/underlinestyles-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/inputformat/underlinestyles-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/inputformat/underlinestyles-property/llms-full.txt

---

### Description

Returns an array of all supported underline styles. This property can be used to fill a combo box or a menu.

### Syntax

```csharp
public FontUnderlineStyle[] UnderlineStyles { get; }
```

```vbnet
Public ReadOnly Property UnderlineStyles As FontUnderlineStyle()
```

### Members

| Value | Description |
|---|---|
| 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](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/inputformat/underlinestyle-property/llms-full.txt) property to a menu item. The menu's header is bind to the UnderlineStyles property. The [WPF.BooleanConverter](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/booleanconverter/llms-full.txt) returns true, if the [UnderlineStyle](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/inputformat/underlinestyle-property/llms-full.txt) property has the value specified through the ConverterParameter:

```plaintext
…
xmlns:tx="clr-namespace:TXTextControl.WPF;assembly=TXTextControl.WPF"
…
<Window.Resources>
    <tx:BooleanConverter x:Key="enumboolconv" />
</Window.Resources>
…
<MenuItem 
    IsCheckable="true" 
    Header="{Binding ElementName=textControl1, Path=InputFormat.UnderlineStyles[0], Mode=OneTime}" 
    IsChecked="{Binding 
        ElementName=textControl1, 
        Path=InputFormat.UnderlineStyle, 
        Converter={StaticResource enumboolconv}, ConverterParameter=Single}"/>
```

The following example changes the formatting applied to text entered at the end of a document by using `InputFormat.UnderlineStyles`.

```csharp
textControl.Text = "Project summary";
textControl.InputPosition = new InputPosition(textControl.Text.Length);
InputFormat inputFormat = textControl.InputFormat;

foreach (FontUnderlineStyle fontUnderlineStyle in inputFormat.UnderlineStyles)
{
    Console.WriteLine(fontUnderlineStyle);
}
```

```vbnet
textControl.Text = "Project summary"
textControl.InputPosition = New InputPosition(textControl.Text.Length)
Dim inputFormat As InputFormat = textControl.InputFormat

For Each fontUnderlineStyle As FontUnderlineStyle In inputFormat.UnderlineStyles
    Console.WriteLine(fontUnderlineStyle)
Next
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [InputFormat.UnderlineStyle Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/inputformat/underlinestyle-property/llms-full.txt)
- **Next:** [InputFormat.VerticallyCentered Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/inputformat/verticallycentered-property/llms-full.txt)
