Barcode Elements

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

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 BarcodeMargin property defines the space around a barcode. Set a barcode for the Top, Bottom, Left, and/or Right using the Margin structure. The margin is the same color as the background color of the barcode. If required, add a quiet zone (the blank space on either end of a linear barcode) using the Left and Right margins.


The X-Dimension is the width of a single bar drawn in the barcode. The default value of X-Dimension is four for QRcode and two for all other barcodes.

Text Alignment

The TextAlign property sets the horizontal alignment of text at the bottom of a barcode and is set to left, right or center.

Intelligent Mail Barcode and UPC/EAN Barcodes

A few things to note regarding the Intelligent Mail Barcode and UPC/EAN barcodes.

In this topic