Version

Binding Data

Before You Begin

The Data property of the UltraBarcode™ family of controls, is what you use to assign the value that you wish to be encoded.

What You Will Accomplish

You will bind data to the Data property of the UltraCode128Barcode control.

Follow these Steps

  1. Add a UltraCode128Barcode control to your form. For more information on this, refer to these topics:

  1. Assign a value to the BarcodeData instance’s Data property:

In Visual Basic:

barcodeData.Data = "324654"

In C#:

barcodeData.Data = "324654";
Note
Note

This example assigns a hard-coded value to the control. However, in a real-world application the value can be assigned from a database, some application logic, or from a barcode scanner. Regardless of where you get the value from, this example shows how the value is assigned to the control. Whenever the Data property of the BarcodeData class changes the control will show the change.

  1. Save and run your application.

xamBarcode DataBinding 01.png