Barcode Elements

All DynamicBarcode Creator classes support the following three properties. Use these properties to set a barcode's margin, x dimension, and text alignment. All DynamicBarcode Creator specific barcode classes inherit from the Barcode class. This class supports the following properties.

Property Purpose
BackColor Gets or sets a barcode's background color.
BarcodeMargin Gets or Sets a barcode's margins.
BarColor Gets or sets a barcode's bar color.
Unit Gets or sets a barcodes unit .
XDimension Gets or sets a barcode's XDimension .


The Margin property defines the space around the barcode. It can be set for Top, Bottom, Left and Right by using the Margin structure. The Margin is of the same color as of the background color of the barcode. A quiet zone (the blank space on either end of a linear barcode) can be achieved as required using the Left and Right margin.


The X-Dimension is the width of a single bar drawn in the barcode. Default value of X-Dimension is 4 for QRcode and 2 for all other barcodes.

Text Alignment

The TextAlign property is used to set the horizontal alignment of a text at bottom of the barcode and it can be set to left, right or center. The Align enumeration cannot be used for text on Intelligent Mail Barcode or any of the UPC/EAN Barcodes. The Intelligent Mail Barcode text can be positioned either above or below the barcode and will be horizontally aligned to the left. The UPC/EAN barcode text will be embedded at the bottom of the barcode; for any UPC/EAN supplements the text will be above the supplement barcode horizontally aligned to the right.

In this topic