Class SfBarcode
Represents the SfBarcode that provides a simple method of encoding text information that is easily read by inexpensive electronic readers.
Inheritance
Implements
Namespace: Syncfusion.SfBarcode.XForms
Assembly: Syncfusion.SfBarcode.XForms.dll
Syntax
public class SfBarcode : View, IDisposable
Constructors
SfBarcode()
Initializes a new instance of the SfBarcode class.
Declaration
public SfBarcode()
Fields
DarkBarColorProperty
Gets or sets the DarkBarColor property.
Declaration
public static readonly BindableProperty DarkBarColorProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
LightBarColorProperty
Gets or sets the LightBarColor property.
Declaration
public static readonly BindableProperty LightBarColorProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
ShowTextProperty
Gets or sets the ShowText property.
Declaration
public static readonly BindableProperty ShowTextProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
SymbologyProperty
Gets or sets the Symbology property.
Declaration
public static readonly BindableProperty SymbologyProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
SymbologySettingsProperty
Gets or sets the SymbologySettings property.
Declaration
public static readonly BindableProperty SymbologySettingsProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
TextAlignmentProperty
Gets or sets the TextAlignment property.
Declaration
public static readonly BindableProperty TextAlignmentProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
TextColorProperty
Gets or sets the TextColor property.
Declaration
public static readonly BindableProperty TextColorProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
TextFontProperty
Gets or sets the TextFont property.
Declaration
public static readonly BindableProperty TextFontProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
TextGapHeightProperty
Gets or sets the TextGapHeight property.
Declaration
public static readonly BindableProperty TextGapHeightProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
TextLocationProperty
Gets or sets the TextLocation property.
Declaration
public static readonly BindableProperty TextLocationProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
TextProperty
Gets or sets the Text property.
Declaration
public static readonly BindableProperty TextProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
Properties
DarkBarColor
The DarkBarColor property is used to set the color of the DarkBar in the BarCode. This is a bindable property.
Declaration
public Color DarkBarColor { get; set; }
Property Value
| Type | Description |
|---|---|
| Xamarin.Forms.Color | This property takes the Xamarin.Forms.Color value. |
LightBarColor
The LightBarColor property is used to set the color of the LightBar in the BarCode. This is a bindable property.
Declaration
public Color LightBarColor { get; set; }
Property Value
| Type | Description |
|---|---|
| Xamarin.Forms.Color | This property takes the Xamarin.Forms.Color value. |
ShowText
The ShowText property is used to define whether to show text or not in the Barcode UI. This is a bindable property.
Declaration
public bool ShowText { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | This property takes the System.Boolean value. |
Symbology
The Symbology property is used to choose the type of the Barcode. This is a bindable property.
Declaration
public BarcodeSymbolType Symbology { get; set; }
Property Value
| Type | Description |
|---|---|
| BarcodeSymbolType | This property takes the BarcodeSymbolType value. |
SymbologySettings
The SymbologySettings property is used to define the Barcode 1D/2D settings properties. This is a bindable property.
Declaration
public BarcodeSettings SymbologySettings { get; set; }
Property Value
| Type | Description |
|---|---|
| BarcodeSettings | This property takes the BarcodeSettings value. |
Text
The Text property is used to set the Text for Barcode. This is a bindable property.
Declaration
public string Text { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | This property takes the System.String value. |
TextAlignment
The TextAlignment property is used to set the TextPosition in the layout for Barcode. This is a bindable property.
Declaration
public BarcodeTextAlignment TextAlignment { get; set; }
Property Value
| Type | Description |
|---|---|
| BarcodeTextAlignment | This property takes the BarcodeTextAlignment value. |
TextColor
The TextColor property is used to set the TextColor of the Barcode. This is a bindable property.
Declaration
public Color TextColor { get; set; }
Property Value
| Type | Description |
|---|---|
| Xamarin.Forms.Color | This property takes the Xamarin.Forms.Color value. |
TextFont
The TextFont property is used to set the TextFontSize of the Barcode. This is a bindable property.
Declaration
public Font TextFont { get; set; }
Property Value
| Type | Description |
|---|---|
| Xamarin.Forms.Font | This property takes the Xamarin.Forms.Font value. |
TextGapHeight
The TextGapHeight property is used to set the Height between the barcode and the Text diplayed. This is a bindable property.
Declaration
public float TextGapHeight { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single | This property takes the System.Single value. |
TextLocation
The TextLocation property is used to set the TextLocation in the Barcode UI. This is a bindable property.
Declaration
public BarcodeTextLocation TextLocation { get; set; }
Property Value
| Type | Description |
|---|---|
| BarcodeTextLocation | This property takes the BarcodeTextLocation value. |
Methods
Dispose()
Dispose SfBarcode object
Declaration
public void Dispose()
OnSizeRequest(Double, Double)
Calculate and return size of the barcode
Declaration
protected override SizeRequest OnSizeRequest(double widthConstraint, double heightConstraint)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | widthConstraint | |
| System.Double | heightConstraint |
Returns
| Type |
|---|
| Xamarin.Forms.SizeRequest |