Class SfBarcode
Control class used to encode the text as bar code and render in Windows Store Apps.
Inheritance
Namespace: Syncfusion.UI.Xaml.Controls.Barcode
Assembly: Syncfusion.SfBarcode.WPF.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 |
---|
System.Windows.DependencyProperty |
DisplayTextProperty
Declaration
public static readonly DependencyProperty DisplayTextProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
LightBarBrushProperty
Declaration
public static readonly DependencyProperty LightBarBrushProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
m_size
Declaration
public SizeF m_size
Field Value
Type |
---|
System.Drawing.SizeF |
QuietZoneProperty
Declaration
public static readonly DependencyProperty QuietZoneProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SymbologyProperty
Declaration
public static readonly DependencyProperty SymbologyProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SymbologySettingsProperty
Declaration
public static readonly DependencyProperty SymbologySettingsProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
TextAlignmentProperty
Declaration
public static readonly DependencyProperty TextAlignmentProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
TextBrushProperty
Declaration
public static readonly DependencyProperty TextBrushProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
TextGapHeightProperty
Declaration
public static readonly DependencyProperty TextGapHeightProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
TextProperty
Declaration
public static readonly DependencyProperty TextProperty
Field Value
Type |
---|
System.Windows.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 |
---|---|
System.Windows.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 |
---|---|
System.Windows.Media.Brush | The default brush is White. |
QuietZone
Gets or sets the QuietZone that surrounds the bar code.
Declaration
public BarcodeQuietZones QuietZone { get; set; }
Property Value
Type |
---|
BarcodeQuietZones |
See Also
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 |
---|---|
System.Windows.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 |
---|---|---|
System.Windows.Size | availableSize |
Returns
Type |
---|
System.Windows.Size |
OnApplyTemplate()
Applies control template.
Declaration
public override void OnApplyTemplate()