BarCodeControl Class

A control that displays barcodes.

Namespace: DevExpress.WinUI.Controls

Assembly: DevExpress.WinUI.Controls.v21.1.dll


public class BarCodeControl :


Create a BarCodeControl

Follow the steps below to add a BarCodeControl to an application:

  1. Reference the DevExpress WinUI NuGet package. Refer to the following topic for more information: Get Started.
  2. Add the following markup to a XAML page: <Controls:BarCodeControl>...</Controls:BarCodeControl>.
  3. Configure the component (see the sections below).
<Page ...

    <Controls:BarCodeControl AutoModule="True" Text="" ShowText="False">
            <Controls:QRCodeSymbology CompactionMode="Byte" Version="0"/>


Editor Value

Set Text to specify the BarCode value.

Use the BinaryData property to code a array of byte into the PDF417 or ECC200 bar code (when their CompactionMode is set to Binary).

Barcode Types

BarCodeControl can display 27 barcode types including QR, UPC, and Intelligent Mail formats.

Our library contains classes that correspond to each supported barcode type. Specify a barcode type to the BarCodeControl.Symbology property and configure the barcode type properties to specify the displayed barcode type and settings.

Error Correction

QR and PDF417 barcodes support error correction.

<Controls:BarCodeControl AutoModule="True" Text="" ShowText="False">
        <Controls:PDF417Symbology ErrorCorrectionLevel="3"/>

Barcode Readability

The Module property allows you to customize the width of the narrowest bar or space. If the Module property is too small, barcode scanner cannot read the resulting barcode.

Set the BarCodeControl.AutoModule property to true to allow BarCodeControl to change the Module property value when a user resizes the barcode.

Barcode Text

The barcode editor can display a string specified by the Text property. Set the ShowText property to true to display code text (text visibility also depends on barcode type).

Use the HorizontalTextAlignment and VerticalTextAlignment properties to align the displayed text.

See Also