# TXBarcodeControl.UpperTextLength Property

> Gets or sets the maximum number of characters the Text property can get.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 29.0
- **Namespace:** `TXTextControl.Barcode`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXBarcode.Windows.Forms.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXBarcode.Windows.Forms.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl.Barcode > TXBarcodeControl.UpperTextLength Property
- **336 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/uppertextlength-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/uppertextlength-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/uppertextlength-property/llms-full.txt

---

### Description

Gets or sets the maximum number of characters the [Text](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/text-property/llms-full.txt) property can get.

### Syntax

```csharp
public int UpperTextLength { get; set; }
```

```vbnet
Public Property UpperTextLength As Integer
```

### Examples

The following example uses `TXBarcodeControl.UpperTextLength` to configure upper text length as part of the txbarcode control workflow. The change is then applied to the active document or user interface.

```csharp
tXBarcodeControl.UpperTextLength = 1;
tXBarcodeControl.Update();
```

```vbnet
tXBarcodeControl.UpperTextLength = 1
tXBarcodeControl.Update()
```

### Remarks

Throws an `ArgumentException`, if the value is not valid for the conditions of the current [barcode type](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/barcodetype-property/llms-full.txt).

---

## Nearby

- **Previous:** [TXBarcodeControl.TextAlignment Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/textalignment-property/llms-full.txt)
- **Next:** [TXBarcodeCore Class](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecore/llms-full.txt)
