How can I change the symbology length?

Changing the length of the barcodes is done through ActiveSymbolCounts property.

For example, to change the Interleaved-Two-of-Five active symbol counts to scan codes with length 20, 22 and 24:

var scanSettings = new BarcodeScannerSettings();
var itfSettings = scanSettings.Symbologies[BarcodeSymbology.Interleaved2Of5];
itfSettings.Enabled = true;
// Activate scanning of ITF codes with length 20, 22, 24
itfSettings.ActiveSymbolCounts = new ushort[] { 20, 22, 24 };

For example to change the Code 128 active symbol counts to scan codes with a range of lengths:

var scanSettings = new BarcodeScannerSettings();
var code128Settings = scanSettings.Symbologies[BarcodeSymbology.Code128];
// Activate scanning of Code128 codes with lengths from 7-30
code128Settings.ActiveSymbolCounts = Enumerable.Range(7, 30).Select( x => (UInt16)x ).ToArray();
code128Settings.Enabled = true;


For the settings to take effect, you need to apply them to the barcode picker, e.g. when creating it, or through BarcodePicker.ApplySettingsAsync().

See Symbology properties.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request