Barcode
Represents a barcode report item.
Definition
Namespace:Telerik.Reporting
Assembly:Telerik.Reporting.dll
Syntax:
[ToolboxBitmap(typeof(Barcode), "Resources.Barcode.bmp")]
public class Barcode : ReportItem, IToggleVisibilityTarget, IActionTarget
Inheritance: objectReportObjectReportItemBaseReportItemBarcode
Implements:
Inherited Members
Example:
This example illustrates how to set the Barcode properties.
var encoder = new Telerik.Reporting.Barcodes.Code128AEncoder();
// Set any specific encoder settings...
encoder.ShowText = false; // The default value is true.
this.barcode1.Encoder = encoder;
this.barcode1.Angle = 90;
this.barcode1.BarAlign = Telerik.Reporting.Drawing.HorizontalAlign.Left;
this.barcode1.Checksum = true;
this.barcode1.Module = Telerik.Reporting.Drawing.Unit.Point(3);
this.barcode1.Stretch = false;
this.barcode1.Value = "1234567890";
Dim encoder = New Telerik.Reporting.Barcodes.Code128AEncoder()
' Set any specific encoder settings...
encoder.ShowText = False 'The default value is True
Me.barcode1.Encoder = encoder Me.barcode1.Angle = 90 Me.barcode1.BarAlign = Telerik.Reporting.Drawing.HorizontalAlign.Left Me.barcode1.Checksum = True Me.barcode1.Module = Telerik.Reporting.Drawing.Unit.Point(3) Me.barcode1.Stretch = False Me.barcode1.Value = "1234567890"
Constructors
Internal use only
public Barcode()
Properties
Angle
double
Gets or sets a value indicating the angle of rotation of the bar code inside the report item, specified in degrees.
public double Angle { get; set; }
A double value indicating the angle of rotation in degrees.
Gets or sets the horizontal alignment of the barcode in the report item.
public HorizontalAlign BarAlign { get; set; }
One of the HorizontalAlign values. The default value is HorizontalAlign.Center.
Checksum
bool
Gets or sets a value indicating whether the barcode should contain a checksum for validation purposes during the scanning process or not.
public bool Checksum { get; set; }
true if the barcode should contain a checksum for validation purposes during the scanning process, otherwise false.
Internal use only
protected override SizeU DefaultSize { get; }
Overrides:
Gets or sets the current encoder used to encode the Value property as series of bars and spaces.
[TypeConverter(typeof(ExpandableObjectConverter))]
public Encoder Encoder { get; set; }
ShowText
bool
Gets or sets a value indicating whether the barcode should display a human-readable text representation of the encoded value.
[Obsolete("The Telerik.Reporting.Barcode.ShowText property is now obsolete. Please use the ShowText property of the respective Telerik.Reporting.Barcodes.Encoder1D instance.")]
[Browsable(false)]
public bool ShowText { get; set; }
true if the barcode should display text, otherwise false.
Stretch
bool
Gets or sets a value indicating whether to stretch the barcode to fill the entire area of the report item item or not.
public bool Stretch { get; set; }
true if the barcode should be stretched, otherwise false.
Gets or sets a value indicating the current symbology used to encode the Value property as series of bars and spaces.
[Browsable(false)]
[Obsolete("The Telerik.Reporting.Barcode.Symbology property is now obsolete. Use Telerik.Reporting.Barcode.Encoder property instead.")]
public Barcode.SymbologyType Symbology { get; set; }
A Barcode.SymbologyType enumerated value indicating the symbology associated with the current barcode.
Value
string
Gets or sets the current value to be encoded in the barcode.
public string Value { get; set; }
A string that starts with the symbol "=" is interpreted as an expression to calculate the value of the current barcode, otherwise the value is interpreted as a literal string.