# TextControl.BarcodeLayoutDialog Method

> Invokes the built-in dialog box for alter the layout settings, the size and the text distances of a barcode. This dialog can only be invoked, if a barcode has been selected.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 19.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.BarcodeLayoutDialog Method
- **599 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/barcodelayoutdialog-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/barcodelayoutdialog-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/barcodelayoutdialog-method/llms-full.txt

---

### Description

Invokes the built-in dialog box for alter the layout settings, the size and the text distances of a barcode. This dialog can only be invoked, if a barcode has been selected.

### Syntax

#### BarcodeLayoutDialog()

Opens the dialog box showing the last opened tab.

```csharp
public DialogResult BarcodeLayoutDialog();
```

```vbnet
Public Function BarcodeLayoutDialog() As DialogResult
```

#### BarcodeLayoutDialog(int)

Opens the dialog box showing the specified tab.

```csharp
public DialogResult BarcodeLayoutDialog(int activeTab);
```

```vbnet
Public Function BarcodeLayoutDialog(activeTab As Integer) As DialogResult
```

| Parameter | Description |
|---|---|
| activeTab | Specifies the index of the tab, zero-based, that is displayed when the tabbed dialog box is opened. If this parameter is 0, the dialog box shows the tab for setting text wrapping and layout attributes, if this parameter is 1, the dialog box shows the tab for setting size and distances and if it is 2, the dialog shows the tab for setting further barcode attributes such as fore- and background color and the barcode's type and text. |

### Return Value

If the dialog has been left with the Cancel button the return value is DialogResult.Cancel. Otherwise, it is DialogResult.OK.

### Examples

The following example opens the barcode layout dialog for the text control.

```csharp
var result = textControl.BarcodeLayoutDialog(10);
Console.WriteLine($"Barcode Layout Dialog result: {result}");
```

```vbnet
Dim result = textControl.BarcodeLayoutDialog(10)
Console.WriteLine($"Barcode Layout Dialog result: {result}")
```

---

## Nearby

- **Previous:** [TextControl.BarcodeDoubleClicked Event](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/barcodedoubleclicked-event/llms-full.txt)
- **Next:** [TextControl.BarcodeMoved Event](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/barcodemoved-event/llms-full.txt)
