CodabarSymbology Class
Represents a barcode symbology implementation for Codabar.
public class CodabarSymbology : LinearBarcodeSymbologyBase
- Inheritance:
- object ObservableObjectBase BarcodeSymbologyBase LinearBarcodeSymbologyBase object
Remarks
This symbology is also known as NW-7, Monarch, Code 2 of 7, Rationalized Codabar, ANSI/AIM BC3-1995, and USD-4.
Codabar is a linear symbology that was designed in 1972 and is commonly used in libraries, blood banks, and on airbills (such as FedEx). Each character encoded is made up of 4 bars and 3 spaces for a total of 7 elements. The widths of bars and spaces vary between narrow and wide.
This symbology can encode digits 0-9 and the characters -$:/.+.
Each encoded value must begin and end with one of the start/stop characters: A, B, C, or D.
The StartCharacter and StopCharacter properties determine which characters are used.
The AreStartStopCharactersVisible property determines whether these start/stop characters are included
in the displayed value.
This symbology is self-checking, so no checksum or check digit is required.
However, if the IsChecksumEnabled property is true, the symbology's implementation auto-calculates
and inserts a modulo-16 check digit.
Constructors
CodabarSymbology()
Initializes an instance of the class.
public CodabarSymbology()
Properties
AreStartStopCharactersVisible
Indicates whether the start/stop characters are visible in the displayed value.
public bool AreStartStopCharactersVisible { get; set; }
Property Value
- bool:
The default value is
false.
ExampleValue
An example value that is valid for the symbology.
IsChecksumEnabled
Indicates whether the optional modulo-16 checksum should be added.
Name
The name of the symbology.
StartCharacter
The start character used for the barcode.
public char StartCharacter { get; set; }
Property Value
- char:
One of
A,B,C, orD(case-insensitive). The default value isA.
StopCharacter
The stop character used for the barcode.
public char StopCharacter { get; set; }
Property Value
- char:
One of
A,B,C, orD(case-insensitive). The default value isB.
WideToNarrowRatio
The ratio of wide bars to narrow bars.
Methods
CreateRenderData(BarcodeEncodingRequest)
Creates the render data for the specified encoding request.
public override BarcodeRenderData CreateRenderData(BarcodeEncodingRequest request)
| Parameter | Type | Description |
|---|---|---|
| request | BarcodeEncodingRequest | The encoding request. |
Returns
- BarcodeRenderData:
The BarcodeRenderData for the encoded value.
GetModulesWidth(int)
Returns the width of the specified number of modules.
protected override double GetModulesWidth(int moduleCount)
| Parameter | Type | Description |
|---|---|---|
| moduleCount | int | The number of modules. |
Returns
- double:
The calculated width, taking into account any adjustments such as wide-to-narrow ratios that a symbology may require.
Validate(string)
Validates the specified value.
public override BarcodeValidationResult Validate(string value)
| Parameter | Type | Description |
|---|---|---|
| value | string | The value to validate. |
Returns
- BarcodeValidationResult:
A BarcodeValidationResult containing the validation result.
Inherited Members
- LinearBarcodeSymbologyBase.GetMargin()
- LinearBarcodeSymbologyBase.BarHeight
- LinearBarcodeSymbologyBase.MinHeightToWidthRatio
- LinearBarcodeSymbologyBase.QuietZoneThickness
- LinearBarcodeSymbologyBase.ValueAlignment
- BarcodeSymbologyBase.CreateRenderDataAsync(BarcodeEncodingRequest, CancellationToken)
- ObservableObjectBase.OnPropertyChanged(string)
- ObservableObjectBase.OnPropertyChanged(PropertyChangedEventArgs)
- ObservableObjectBase.OnPropertyChanging(string)
- ObservableObjectBase.OnPropertyChanging(PropertyChangingEventArgs)
- ObservableObjectBase.SetProperty<T>(ref T, T, string)
- ObservableObjectBase.PropertyChanged
- ObservableObjectBase.PropertyChanging
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()