Class BarcodeBase
This is the base class for all bar code type controls.
Inheritance
Namespace: Telerik.Windows.Controls.Barcode
Assembly: Telerik.Windows.Controls.DataVisualization.dll
Syntax
[Obsolete("Use RadBarcode with the Code11 symbology. More info on upgrading at https://docs.telerik.com/devtools/wpf/controls/radbarcode/upgrading")]
public abstract class BarcodeBase : Control
Constructors
BarcodeBase()
Fields
RenderChecksumProperty
Identifies the RenderChecksum dependency property.
Declaration
public static readonly DependencyProperty RenderChecksumProperty
Field Value
System.Windows.DependencyProperty
|
RestrictAspectRatioProperty
Identifies the RestrictAspectRatio dependency property.
Declaration
public static readonly DependencyProperty RestrictAspectRatioProperty
Field Value
System.Windows.DependencyProperty
|
ShowChecksumProperty
Identifies the ShowChecksum dependency property.
Declaration
public static readonly DependencyProperty ShowChecksumProperty
Field Value
System.Windows.DependencyProperty
|
ShowTextProperty
Identifies the ShowText dependency property.
Declaration
public static readonly DependencyProperty ShowTextProperty
Field Value
System.Windows.DependencyProperty
|
TextProperty
Identifies the BarcodeText dependency property.
Declaration
public static readonly DependencyProperty TextProperty
Field Value
System.Windows.DependencyProperty
|
Properties
BarcodeEncodedText
This is the encoded text.
Declaration
protected string BarcodeEncodedText { get; set; }
Property Value
System.String
|
Checksum
This is the checksum, calculated on the barcode.
Declaration
protected string Checksum { get; set; }
Property Value
System.String
|
RenderChecksum
Gets or sets a value that determines whether the checksum should be included in the barcode's image. By default this property is set to true
. Scanning barcodes with most of the standards
will be possible only when they include checksum. You could use this property to turn off the auto calculated checksum if you have already calculated it yourself and passed it as part of the
Text property.
Declaration
public bool RenderChecksum { get; set; }
Property Value
System.Boolean
|
RestrictAspectRatio
Gets or sets a boolean value, indicating whether the aspect ratio should be preserved or not.
Declaration
public bool RestrictAspectRatio { get; set; }
Property Value
System.Boolean
|
ShowChecksum
Gets or sets a value that determines whether the checksum will be displayed at the end of the text.
Declaration
public bool ShowChecksum { get; set; }
Property Value
System.Boolean
|
ShowText
Gets or sets a value that determines whether the text will be displayed.
Declaration
public bool ShowText { get; set; }
Property Value
System.Boolean
|
Text
Gets or sets the Text entered by the user.
Declaration
public string Text { get; set; }
Property Value
System.String
|
Methods
GetLeadingZeros(String)
This method gets all leading zeroes in a string.
Declaration
protected static int GetLeadingZeros(string value)
Parameters
System.String
value
|
Returns
System.Int32
|
GetTrailingZeros(String)
This method gets all trailing zeroes in a string.
Declaration
protected static int GetTrailingZeros(string value)
Parameters
System.String
value
|
Returns
System.Int32
|
OnApplyTemplate()
Overrides the OnApplyTemplate method.
Declaration
public override void OnApplyTemplate()
OnCreateAutomationPeer()
Returns class-specific System.Windows.Automation.Peers.AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
System.Windows.Automation.Peers.AutomationPeer
The type-specific System.Windows.Automation.Peers.AutomationPeer implementation. |
RenderChecksumChangedHandler(DependencyObject, DependencyPropertyChangedEventArgs)
Called when the RenderChecksum property is changed.
Declaration
protected static void RenderChecksumChangedHandler(DependencyObject source, DependencyPropertyChangedEventArgs eventArgs)
Parameters
System.Windows.DependencyObject
source
The source. |
System.Windows.DependencyPropertyChangedEventArgs
eventArgs
The System.Windows.DependencyPropertyChangedEventArgs instance containing the event data. |
RestrictAspectRatioChangedHandler(DependencyObject, DependencyPropertyChangedEventArgs)
Called when the RestrictAspectRatio property was changed.
Declaration
protected static void RestrictAspectRatioChangedHandler(DependencyObject source, DependencyPropertyChangedEventArgs eventArgs)
Parameters
System.Windows.DependencyObject
source
The source. |
System.Windows.DependencyPropertyChangedEventArgs
eventArgs
The System.Windows.DependencyPropertyChangedEventArgs instance containing the event data. |
SetGridDimensions(Double, Size, Grid, Double, Double)
This method sets the dimensions of the barcode.
Declaration
protected static void SetGridDimensions(double codeRatio, Size availableSize, Grid codeGrid, double ratioWidth, double ratioHeight)
Parameters
System.Double
codeRatio
|
System.Windows.Size
availableSize
|
System.Windows.Controls.Grid
codeGrid
|
System.Double
ratioWidth
|
System.Double
ratioHeight
|
ShowChecksumChangedHandler(DependencyObject, DependencyPropertyChangedEventArgs)
Called when the ShowChecksum property was changed.
Declaration
protected static void ShowChecksumChangedHandler(DependencyObject source, DependencyPropertyChangedEventArgs eventArgs)
Parameters
System.Windows.DependencyObject
source
The source. |
System.Windows.DependencyPropertyChangedEventArgs
eventArgs
The System.Windows.DependencyPropertyChangedEventArgs instance containing the event data. |
ShowTextChangedHandler(DependencyObject, DependencyPropertyChangedEventArgs)
Called when the ShowText property was changed.
Declaration
protected static void ShowTextChangedHandler(DependencyObject source, DependencyPropertyChangedEventArgs eventArgs)
Parameters
System.Windows.DependencyObject
source
The source. |
System.Windows.DependencyPropertyChangedEventArgs
eventArgs
The System.Windows.DependencyPropertyChangedEventArgs instance containing the event data. |
TextChangedHandler(DependencyObject, DependencyPropertyChangedEventArgs)
Called when the Text property was changed.
Declaration
protected static void TextChangedHandler(DependencyObject source, DependencyPropertyChangedEventArgs eventArgs)
Parameters
System.Windows.DependencyObject
source
The source. |
System.Windows.DependencyPropertyChangedEventArgs
eventArgs
The System.Windows.DependencyPropertyChangedEventArgs instance containing the event data. |