# TextControl.RulerBar Property

> Specifies the horizontal ruler bar control to be used with a TextControl. The property value is an empty string, if there is no ruler bar connected. Otherwise it must be the name of an existing WPF.RulerBar object.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 16.0
- **Namespace:** `TXTextControl.WPF`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.WPF.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.WPF.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl.WPF > TextControl.RulerBar Property
- **443 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/rulerbar-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/rulerbar-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/rulerbar-property/llms-full.txt

---

### Description

Specifies the horizontal ruler bar control to be used with a TextControl. The property value is an empty string, if there is no ruler bar connected. Otherwise it must be the name of an existing [WPF.RulerBar](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar/llms-full.txt) object.

### Syntax

```csharp
public string RulerBar { get; set; }
```

```vbnet
Public Property RulerBar As String
```

### Examples

The following example uses `TextControl.RulerBar` to configure ruler bar as part of the text control workflow. The configured value is checked before the workflow continues.

```csharp
textControl.RulerBar = "Quarterly report";
if (!string.IsNullOrWhiteSpace(textControl.RulerBar))
{
    Console.WriteLine($"Ruler Bar: {textControl.RulerBar}");
}
```

```vbnet
textControl.RulerBar = "Quarterly report"
If Not String.IsNullOrWhiteSpace(textControl.RulerBar) Then
    Console.WriteLine($"Ruler Bar: {textControl.RulerBar}")
End If
```

---

## Nearby

- **Previous:** [TextControl.RibbonViewTab Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/ribbonviewtab-property/llms-full.txt)
- **Next:** [TextControl.Save Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/save-method/llms-full.txt)
