Class BarcodeBase
Represents a base class for all barcode types.
Namespace: Syncfusion.UI.Xaml.Controls.Barcode
Assembly: Syncfusion.SfBarcode.WPF.dll
Syntax
public class BarcodeBase : Object
Constructors
BarcodeBase()
Initializes a new instance of the Syncfusion.UI.Xaml.Controls.Barcode class.
Declaration
public BarcodeBase()
BarcodeBase(String)
Initializes a new instance of the Syncfusion.UI.Xaml.Controls.Barcode class.
Declaration
public BarcodeBase(string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | Set the barcode text. |
Fields
barHeight
Indicates the bar height of the barcode.
Declaration
protected float barHeight
Field Value
Type |
---|
System.Single |
bounds
Indicates the region of the barcode.
Declaration
protected Rect bounds
Field Value
Type |
---|
System.Windows.Rect |
Properties
BackColor
Gets or sets the back color of the barcode.
Declaration
public Color BackColor { get; set; }
Property Value
Type |
---|
System.Windows.Media.Color |
BarColor
Gets or sets the bar color of the barcode.
Declaration
public Color BarColor { get; set; }
Property Value
Type |
---|
System.Windows.Media.Color |
BarHeight
Gets or sets the bar height.
Declaration
public float BarHeight { get; set; }
Property Value
Type |
---|
System.Single |
Bounds
Declaration
public Rect Bounds { get; set; }
Property Value
Type |
---|
System.Windows.Rect |
Location
Declaration
public Point Location { get; set; }
Property Value
Type |
---|
System.Windows.Point |
NarrowBarWidth
Gets or sets the narrow bar width.
Declaration
public float NarrowBarWidth { get; set; }
Property Value
Type |
---|
System.Single |
QuietZone
Gets or sets the empty area which is to be allocated around the barcode.
Declaration
public BarcodeQuietZones QuietZone { get; set; }
Property Value
Type |
---|
BarcodeQuietZones |
Size
Declaration
public Size Size { get; set; }
Property Value
Type |
---|
System.Windows.Size |
Text
Gets or Sets the barcode text.
Declaration
public string Text { get; set; }
Property Value
Type |
---|
System.String |
Methods
GetSizeValue()
Internal method which calculates the size of the barcode which is going to rendered.
Declaration
protected virtual Size GetSizeValue()
Returns
Type |
---|
System.Windows.Size |
Validate(String)
Internal method which validates whether the given text is acceptable by the current barcode specification or not.
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 |