Version

Configuring WidthToHeight Ratio

The WidthToHeightRatio property (for all barcode grid symbologies ) defines the width to height ratio of a barcode row. For the linear symbologies, it defines the ratio of the bars height depending on the XDimension property value, i.e. if barcode. WidthToHeightRatio = 30, the bar height is 30*barcode.XDimension. The property value is used to define the symbol bar height when Stretch.None is used and no Height is specified. The nominal value for every barcode is set as its default value.

xamBarcode WidthToHeightRatio 01.png

In Visual Basic:

Dim barcode1 As New UltraCode128Barcode With _
{
  .Stretch = 320, _
  .Data = "Code Data", _
  .WidthToHeightRatio = 25 _
}

Dim barcode2 As New UltraCode128Barcode With _
{
  .Stretch = 320, _
  .Data = "Code Data", _
  .WidthToHeightRatio = 35 _
}

In C#:

var barcode1 = new UltraCode128Barcode
{
  Width = 320,
  Data = "Code Data",
  WidthToHeightRatio = 25
};

var barcode2 = new UltraCode128Barcode
{
  Width = 320,
  Data = "Code Data",
  WidthToHeightRatio = 35
};