# TextControl.DialogUnit Property

> Gets or sets a value indicating the measuring unit used for sizes and distances in dialogboxes.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 28.0
- **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 > TextControl.DialogUnit Property
- **377 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/dialogunit-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/dialogunit-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/dialogunit-property/llms-full.txt

---

### Description

Gets or sets a value indicating the measuring unit used for sizes and distances in dialogboxes.

### Syntax

```csharp
public DialogUnit DialogUnit { get; set; }
```

```vbnet
Public Property DialogUnit As DialogUnit
```

### Members

| Value | Description |
|---|---|
| Auto | The measuring unit in dialogboxes depends on the culture set for the current thread. |
| Centimeter | The measuring unit in dialogboxes is centimeter. |
| Inch | The measuring unit in dialogboxes is inch. |
| Millimeter | The measuring unit in dialogboxes is millimeter. |

### Examples

The following example uses `TextControl.DialogUnit` to configure dialog unit as part of the text control workflow. The change is then applied to the active document or user interface.

```csharp
textControl.DialogUnit = DialogUnit.Auto;
textControl.Update();
```

```vbnet
textControl.DialogUnit = DialogUnit.Auto
textControl.Update()
```

---

## Nearby

- **Previous:** [TextControl.Cut Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/cut-method/llms-full.txt)
- **Next:** [TextControl.DisplayColors Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/displaycolors-property/llms-full.txt)
