New to Telerik UI for ASP.NET Core? Start a free 30-day trial

Barcode

Class

Kendo UI Barcode component

Definition

Constructors

Initializes a new instance of the Barcode class.

C#
public Barcode(ViewContext viewContext)
Parameters:viewContextViewContext

Properties

The background of the barcode area. Any valid CSS color string will work here, including hex and rgb.

C#
public string Background { get; set; }

The border of the barcode area.

C#
public BarcodeBorderSettings Border { get; }

If set to true, the Barcode will display the checksum digit next to the value in the text area.

C#
public bool? Checksum { get; set; }

The color of the bar elements. Any valid CSS color string will work here, including hex and rgb.

C#
public string Color { get; set; }

Encoding member.

C#
public BarcodeSymbology Encoding { get; set; }

The height of the barcode in pixels. By default the height is 100.

C#
public double? Height { get; set; }

The padding of the barcode.

C#
public BarcodePaddingSettings Padding { get; }

Sets the preferred rendering engine. If it is not supported by the browser, the Barcode will switch to the first available mode.The supported values are: "canvas" - renders the widget as a Canvas element, if available. or "svg" - renders the widget as inline SVG document, if available.

C#
public RenderingMode? RenderAs { get; set; }

Can be set to a JavaScript object which represents the text configuration.

C#
public BarcodeTextSettings Text { get; }

The initial value of the Barcode

C#
public string Value { get; set; }

The width of the barcode in pixels. By default the width is 300.

C#
public double? Width { get; set; }

Methods

Serializes the component settings to a dictionary.

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

A dictionary of settings.

Overrides: WidgetBase.Serialize()

SerializeSettings method.

C#
protected override Dictionary<string, object> SerializeSettings()
Returns:

Dictionary<string, object>

Overrides: WidgetBase.SerializeSettings()

VerifySettings method.

C#
public override void VerifySettings()

Overrides: WidgetBase.VerifySettings()

Writes the HTML content.

C#
protected override void WriteHtml(TextWriter writer)
Parameters:writerTextWriter

The text writer.

Overrides: WidgetBase.WriteHtml(TextWriter)

WriteInitializationScript method.

C#
public override void WriteInitializationScript(TextWriter writer)
Parameters:writerTextWriter

Overrides: WidgetBase.WriteInitializationScript(TextWriter)