# TXBarcodeCore.Text Property

> Gets or sets the text the barcode should encrypt.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 33.0
- **Namespace:** `TXTextControl.Barcode`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXBarcode.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXBarcode.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl.Barcode > TXBarcodeCore.Text Property
- **456 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-barcode/txbarcodecore/text-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-barcode/txbarcodecore/text-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-barcode/txbarcodecore/text-property/llms-full.txt

---

### Description

Gets or sets the text the barcode should encrypt.

### Syntax

```csharp
public string Text { get; set; }
```

```vbnet
Public Property Text As String
```

### Examples

The following example uses `TXBarcodeCore.Text` to replace the txbarcode core's displayed content. The configured value is checked before the workflow continues.

```csharp
tXBarcodeCore.Text = "Quarterly results";
if (!string.IsNullOrWhiteSpace(tXBarcodeCore.Text))
{
    Console.WriteLine($"Text: {tXBarcodeCore.Text}");
}
```

```vbnet
tXBarcodeCore.Text = "Quarterly results"
If Not String.IsNullOrWhiteSpace(tXBarcodeCore.Text) Then
    Console.WriteLine($"Text: {tXBarcodeCore.Text}")
End If
```

### 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-wpf/reference/txtextcontrol-barcode/txbarcodecore/barcodetype-property/llms-full.txt).

---

## Nearby

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