Version

Configuring Bars Fill Mode

The BarsFillMode property (for all barcode grid symbologies, excluding the MaxiCode) defines how the internal grid containing the bars will fill the XamBarcode control’s dimensions. It has the following values:

  • FillSpace – ensures that the internal grid will fill the XamBarcode control. Take into consideration that depending on the dimensions of the control and the bars grid and the DPI of the user, in some cases the bars’ width and height differ from the actual ones in pixels. This might make the barcode unreadable – if the internal grid has 200 columns and the width of the control is 300 px then the columns bars will have integer widths (some will be 1px and some 2px) to fill the control. This mode is recommended for all scenarios where there is no machine reading.

In XAML:

<ig:XamIntelligentMailBarcode x:Name="Barcode" Width="321"
    Data="1212312345612345678912345"
    BarsFillMode="FillSpace" />

In C#:

var Barcode = new XamIntelligentMailBarcode();
Barcode.Width = 321;
Barcode.Data = "1212312345612345678912345";
Barcode.BarsFillMode = BarsFillMode.FillSpace;

In Visual Basic:

Dim Barcode As New XamIntelligentMailBarcode()
Barcode.Width = 321
Barcode.Data = "1212312345612345678912345"
Barcode.BarsFillMode = BarsFillMode.FillSpace
xamBarcode BarsFillMode 01.png
Note
Note:

FillSpace is the default value of the BarsFillMode property.

  • EnsureEqualSize – ensures that all internal grid bar cells have the same dimensions. If the internal grid has 200 columns and the width of the control is 300px then the grid will shrink to 200px in width making all cells equal. This mode is recommended for machine reading.

In XAML:

<ig:XamIntelligentMailBarcode x:Name="Barcode" Width="321"
    Data="1212312345612345678912345"
    BarsFillMode="EnsureEqualSize" />

In Visual Basic:

Dim Barcode As New XamIntelligentMailBarcode()
Barcode.Width = 321
Barcode.Data = "1212312345612345678912345"
Barcode.BarsFillMode = BarsFillMode.EnsureEqualSize

In C#:

XamIntelligentMailBarcode Barcode = new XamIntelligentMailBarcode();
Barcode.Width = 321;
Barcode.Data = "1212312345612345678912345";
Barcode.BarsFillMode = BarsFillMode.EnsureEqualSize;
xamBarcode BarsFillMode 02.png