# RulerBar.ScaleUnit Property

> Gets or sets the unit of the ruler bar's scale.

- **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 > RulerBar.ScaleUnit Property
- **417 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar/scaleunit-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar/scaleunit-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar/scaleunit-property/llms-full.txt

---

### Description

Gets or sets the unit of the ruler bar's scale.

### Syntax

```csharp
public RulerBarScaleUnit ScaleUnit { get; set; }
```

```vbnet
Public Property ScaleUnit As RulerBarScaleUnit
```

### Members

| Value | Description |
|---|---|
| Auto | The ruler is automatically scaled in inch or in millimeter depending on the currently set culture. |
| Centimeter | The ruler bar is scaled in centimeter without millimeter marks. |
| Inch | The ruler bar is scaled in inch. |
| Millimeter | The ruler bar is scaled in centimeter including millimeter marks. |

### Examples

The following example uses `RulerBar.ScaleUnit` to configure scale unit as part of the ruler bar workflow. The configured value is checked before the workflow continues.

```csharp
rulerBar.ScaleUnit = RulerBarScaleUnit.Auto;
Console.WriteLine($"Scale Unit used by Ruler Bar: {rulerBar.ScaleUnit}");
```

```vbnet
rulerBar.ScaleUnit = RulerBarScaleUnit.Auto
Console.WriteLine($"Scale Unit used by Ruler Bar: {rulerBar.ScaleUnit}")
```

---

## Nearby

- **Previous:** [RulerBar.FormulaMode Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar/formulamode-property/llms-full.txt)
- **Next:** [Sidebar Class](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/sidebar/llms-full.txt)
