Class UnidimensionalBarcode
Represents the base class for all single dimensional barcode Symbology.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.UI.Xaml.Barcode
Assembly: Syncfusion.Barcode.WinUI.dll
Syntax
public abstract class UnidimensionalBarcode : BarcodeBase, INotifyPropertyChanged
Remarks
This class provides the base class for the following SfBarcode types,
Constructors
UnidimensionalBarcode()
Initializes the new instance of UnidimensionalBarcode
Declaration
public UnidimensionalBarcode()
Properties
EnableCheckSum
Gets or sets whether to calculate a checksum for the UnidimensionalBarcode types.
Declaration
public bool EnableCheckSum { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if checksum is calculated; otherwise, false. The default value is false. |
Remarks
This property is applicable only for UnidimensionalBarcode types. The checksum, also known as the check digit, is the number on the right side of the barcode. The purpose of the check digit is to verify that the barcode information has been provided correctly. This check sum can be shown or hidden using ShowCheckSum
EncodeStartStopSymbols
Gets or sets whether to encode start and stop symbols for the UnidimensionalBarcode types.
Declaration
public bool EncodeStartStopSymbols { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if start and stop is encoded; otherwise, false. The default value is true. |
Remarks
This property is applicable only for UnidimensionalBarcode types.
ShowCheckSum
Gets or sets whether to display check sum text on the right side of the SfBarcode.
Declaration
public bool ShowCheckSum { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if check sum text is displayed; otherwise, false. The default value is false. |
Remarks
This property is applicable only for UnidimensionalBarcode types.
See Also
Methods
CalculateCheckDigit(SfBarcode)
Calculates the check digit based on the barcode specification.
Declaration
protected virtual char[] CalculateCheckDigit(SfBarcode barcode)
Parameters
Type | Name | Description |
---|---|---|
SfBarcode | barcode | Barcode |
Returns
Type | Description |
---|---|
System.Char[] | Char array containing Check digits |
GetExtendedText(SfBarcode)
To get the Extended Text
Declaration
protected virtual string GetExtendedText(SfBarcode barcode)
Parameters
Type | Name | Description |
---|---|---|
SfBarcode | barcode | Barcode |
Returns
Type | Description |
---|---|
System.String | Returns Extended Text. |
GetTextToEncode(SfBarcode)
Returns the Actual text to encode.
Declaration
protected virtual string GetTextToEncode(SfBarcode barcode)
Parameters
Type | Name | Description |
---|---|---|
SfBarcode | barcode | Barcode |
Returns
Type | Description |
---|---|
System.String | The Actual Text. |
Validate(String)
Internal method used to validate the given barcode text.
Declaration
protected virtual bool Validate(string data)
Parameters
Type | Name | Description |
---|---|---|
System.String | data | The Text. |
Returns
Type | Description |
---|---|
System.Boolean | True if valid, Otherwise False. |