# RulerBar.ScaleUnit Property

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

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXTextControl.Windows.Forms.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.Windows.Forms.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl > RulerBar.ScaleUnit Property
- **377 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/rulerbar/scaleunit-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/rulerbar/scaleunit-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/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 change is then applied to the active document or user interface.

```csharp
rulerBar.ScaleUnit = RulerBarScaleUnit.Auto;
rulerBar.Update();
```

```vbnet
rulerBar.ScaleUnit = RulerBarScaleUnit.Auto
rulerBar.Update()
```

---

## Nearby

- **Previous:** [RulerBar.ResetDisplayColors Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/rulerbar/resetdisplaycolors-method/llms-full.txt)
- **Next:** [SaveSettings Class](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/llms-full.txt)
