Unplanned
Last Updated: 12 Dec 2024 13:40 by Martin Ivanov
Martin Ivanov
Created on: 12 Dec 2024 13:40
Category: Barcode
Type: Bug Report
0
Barcode: Difference in the minimum size where the barcode cannot be read anymore between the new and old barcode implementations

This was reported in the Code11 and Code39 symbologies.

In the old RadBarcode39 and RadBarcode11 controls the minimum width where the barcode cannot be read any longer is around 180px in the specific scenario. 

In the new RadBarcode and its Code11 and Code39 symbologies, the minimum width is different - around 270px. This reproduces when the SizingMode of the symbology is set to Stretch.

To work this around, you can set the SizingMode of the symbology to Snap. Or alternatively, you can use a bigger Width value for the barcode control, and then apply a ScaleTransform to resize it to the smaller size.

private void RadBarcode_Loaded(object sender, RoutedEventArgs e)
{
    var barcode = (RadBarcode)sender;
    var desiredWidth = 250;
    double relativeWidthDelta = desiredWidth / barcode.ActualWidth;
    barcode.LayoutTransform = new ScaleTransform() { ScaleX = relativeWidthDelta };
}

0 comments