Class SfBarcode
The SfBarcode control class is used to encode the text as bar code in a machine-readable format. It provides a perfect approach to encode text using supported symbology types.
Inheritance
Namespace: Syncfusion.UI.Xaml.Controls.Barcode
Assembly: Syncfusion.SfBarcode.UWP.dll
Syntax
public class SfBarcode : Control
Constructors
SfBarcode()
Initializes BarcodeControl class.
Declaration
public SfBarcode()
Fields
DarkBarBrushProperty
Declaration
public static readonly DependencyProperty DarkBarBrushProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
DisplayTextProperty
Declaration
public static readonly DependencyProperty DisplayTextProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
LightBarBrushProperty
Declaration
public static readonly DependencyProperty LightBarBrushProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
QuietZoneProperty
Identifies the QuietZone dependency property
Declaration
public static readonly DependencyProperty QuietZoneProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the QuietZone dependency property
SymbologyProperty
Declaration
public static readonly DependencyProperty SymbologyProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
SymbologySettingsProperty
Declaration
public static readonly DependencyProperty SymbologySettingsProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
TextAlignmentProperty
Declaration
public static readonly DependencyProperty TextAlignmentProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
TextBrushProperty
Declaration
public static readonly DependencyProperty TextBrushProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
TextGapHeightProperty
Declaration
public static readonly DependencyProperty TextGapHeightProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
TextProperty
Declaration
public static readonly DependencyProperty TextProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
Properties
DarkBarBrush
Gets or sets the Brush for the darker area of bar code.
Declaration
public Brush DarkBarBrush { get; set; }
Property Value
Type | Description |
---|---|
Windows.UI.Xaml.Media.Brush | The default brush is Black. |
DisplayText
Gets or sets whether to display original text.
Declaration
public bool DisplayText { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is True. |
LightBarBrush
Gets or sets the Brush for the lighter area of bar code.
Declaration
public Brush LightBarBrush { get; set; }
Property Value
Type | Description |
---|---|
Windows.UI.Xaml.Media.Brush | The default brush is White. |
QuietZone
Declaration
public BarcodeQuietZones QuietZone { get; set; }
Property Value
Type |
---|
BarcodeQuietZones |
Rotation
Gets or sets the rotation of the control.
Declaration
public BarcodeRotation Rotation { get; set; }
Property Value
Type | Description |
---|---|
BarcodeRotation | The default value is Angle0. |
See Also
Symbology
Gets or sets the bar code symbol type.
Declaration
public BarcodeSymbolType Symbology { get; set; }
Property Value
Type | Description |
---|---|
BarcodeSymbolType | The default value is Code39. |
See Also
SymbologySettings
Gets or sets the Settings for the applied bar code type.
Declaration
public Settings SymbologySettings { get; set; }
Property Value
Type |
---|
Settings |
Text
Gets or sets the text to encode.
Declaration
public string Text { get; set; }
Property Value
Type |
---|
System.String |
TextAlignment
Gets or sets the horizontal alignment of the text.
Declaration
public BarcodeTextAlignment TextAlignment { get; set; }
Property Value
Type | Description |
---|---|
BarcodeTextAlignment | The default value is Center. |
See Also
TextBrush
Gets or sets the text brush.
Declaration
public Brush TextBrush { get; set; }
Property Value
Type | Description |
---|---|
Windows.UI.Xaml.Media.Brush | The default brush is Black. |
TextGapHeight
Gets or sets the height between bar code and the text.
Declaration
public double TextGapHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 0. |
Remarks
The value is in pixel.
TextLocation
Gets of sets the vertical alignment of the text.
Declaration
public BarcodeTextLocation TextLocation { get; set; }
Property Value
Type | Description |
---|---|
BarcodeTextLocation | The default value is Bottom. |
See Also
Methods
MeasureOverride(Size)
Adjusts the size of the control based on value change.
Declaration
protected override Size MeasureOverride(Size availableSize)
Parameters
Type | Name | Description |
---|---|---|
Windows.Foundation.Size | availableSize |
Returns
Type |
---|
Windows.Foundation.Size |
OnApplyTemplate()
Applies control template.
Declaration
protected override void OnApplyTemplate()