# RulerBar Class

> The WPF.RulerBar class represents a tool bar which can be used to show or to set indents, margins and tabs of a WPF.TextControl. It can be connected with a WPF.TextControl through the WPF.TextControl.RulerBar or WPF.TextControl.VerticalRulerBar properties.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Class
- **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
- **Inherits:** `System.Windows.Controls.Control` › `TXTextControl.WPF.TextControlToolBar`
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl.WPF > RulerBar Class
- **780 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar/llms-full.txt

---

### Description

The WPF.RulerBar class represents a tool bar which can be used to show or to set indents, margins and tabs of a [WPF.TextControl](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/llms-full.txt). It can be connected with a [WPF.TextControl](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/llms-full.txt) through the [WPF.TextControl.RulerBar](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/rulerbar-property/llms-full.txt) or [WPF.TextControl.VerticalRulerBar](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/verticalrulerbar-property/llms-full.txt) properties.

### Syntax

```csharp
public class RulerBar : TextControlToolBar
```

```vbnet
Public Class RulerBar
    Inherits TextControlToolBar
```

### Examples

The following example creates a Ruler Bar instance and configures its border style setting for a document workflow.

```csharp
TXTextControl.WPF.RulerBar rulerBar = new();
rulerBar.BorderStyle = RulerBarBorderStyle.Simple3D;
```

```vbnet
Dim rulerBar As New TXTextControl.WPF.RulerBar()
rulerBar.BorderStyle = RulerBarBorderStyle.Simple3D
```

---

## In This Section

- [RulerBar.BorderStyle Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar/borderstyle-property/llms-full.txt): Gets or sets the border style of the ruler bar.
- [RulerBar.DisplayColors Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar/displaycolors-property/llms-full.txt): Gets or sets the colors of the ruler bar. These colors are only used when the BorderStyle property has been set to ColorScheme. The property value is an object of the type WPF.RulerBarColors.
- [RulerBar.EnablePageMargins Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar/enablepagemargins-property/llms-full.txt): Enables or disables the setting of page margins. If the property's value is true, the setting of page margins is enabled.
- [RulerBar.FormulaMode Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar/formulamode-property/llms-full.txt): Gets or sets a value specifying whether the ruler bar shows cell references when the current input position is in a table cell. Depending on the WPF.TextControl.FormulaReferenceStyle property cell references are shown either in the A1 or in the R1C1 notation. This property has no effect when the BorderStyle property has been set to RulerBarBorderStyle.Simple3D or RulerBarBorderStyle.Fixed3D.
- [RulerBar.ScaleUnit Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar/scaleunit-property/llms-full.txt): Gets or sets the unit of the ruler bar's scale.

---

## Nearby

- **Previous:** [RibbonViewTab.RibbonItem Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/ribbonviewtab/ribbonitem-enumeration/llms-full.txt)
- **Next:** [RulerBar.BorderStyle Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar/borderstyle-property/llms-full.txt)
