New to Telerik UI for .NET MAUI? Start a free 30-day trial

Sizing Modes for .NET MAUI Barcode

The Barcode provides three sizing modes that enable you to fine-tune the rendering of your codes.

  • Manual—You can define the size of the smallest line or dot of the barcode through the Module property and, as a result, the other lines and dots multiply that size. The Module property is measured in device pixels.
  • Snap—In the snap sizing mode the code is stretched to the available size, but each line or dot is drawn with an exact number of pixels. As a result, the lines and dots appear sharp.
  • Stretch—In the stretch sizing mode, the code is stretched to fit the available size. Each line or dot size is calculated so they snap to the device pixels. for the lines to stay sharp and stretch the barcode to the available size, some of them are thicker than others.

To apply the desired sizing mode to the Barcode:

1. Add the sizing mode you need to the barcode, for example, the manual one.

<telerik:RadBarcode WidthRequest="300" HeightRequest="100" 
    HorizontalOptions="Center" VerticalOptions="Center"
        <telerik:Code39 HorizontalTextAlignment="Center" 

2. Add the following namespace.


The following image shows a barcode with its applied manual sizing mode.

Barcode SizingMode

See Also

In this article