Demos About Radzen
Search Results for

    Show / Hide Table of Contents

    Class RadzenBarcode

    A 1D barcode generator component that renders barcodes as SVG graphics. Generates barcodes entirely client-side (no external dependencies).

    Inheritance
    object
    ComponentBase
    RadzenComponent
    RadzenBarcode
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    RadzenComponent.OnMouseEnter()
    RadzenComponent.OnMouseLeave()
    RadzenComponent.OnContextMenu(MouseEventArgs)
    RadzenComponent.GetCssClass()
    RadzenComponent.GetId()
    RadzenComponent.Debounce(Func<Task>, int)
    RadzenComponent.OnInitialized()
    RadzenComponent.SetParametersAsync(ParameterView)
    RadzenComponent.OnAfterRenderAsync(bool)
    RadzenComponent.RaiseContextMenu(MouseEventArgs)
    RadzenComponent.RaiseMouseEnter()
    RadzenComponent.AddContextMenu()
    RadzenComponent.RaiseMouseLeave()
    RadzenComponent.Dispose()
    RadzenComponent.Attributes
    RadzenComponent.Element
    RadzenComponent.MouseEnter
    RadzenComponent.MouseLeave
    RadzenComponent.ContextMenu
    RadzenComponent.Culture
    RadzenComponent.DefaultCulture
    RadzenComponent.Style
    RadzenComponent.Visible
    RadzenComponent.UniqueID
    RadzenComponent.JSRuntime
    RadzenComponent.IsJSRuntimeAvailable
    RadzenComponent.Reference
    RadzenComponent.CurrentStyle
    ComponentBase.OnInitializedAsync()
    ComponentBase.OnParametersSet()
    ComponentBase.OnParametersSetAsync()
    ComponentBase.StateHasChanged()
    ComponentBase.ShouldRender()
    ComponentBase.OnAfterRender(bool)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.DispatchExceptionAsync(Exception)
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: Radzen.Blazor
    Assembly: Radzen.Blazor.dll
    Syntax
    public class RadzenBarcode : RadzenComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
    Examples
    <RadzenBarcode Value="RADZEN-12345" Type="RadzenBarcodeType.Code128" Height="80px" />

    Constructors

    RadzenBarcode()

    A 1D barcode generator component that renders barcodes as SVG graphics. Generates barcodes entirely client-side (no external dependencies).

    Declaration
    public RadzenBarcode()
    Examples
    <RadzenBarcode Value="RADZEN-12345" Type="RadzenBarcodeType.Code128" Height="80px" />

    Properties

    Background

    Gets or sets the barcode background color.

    Declaration
    [Parameter]
    public string Background { get; set; }
    Property Value
    Type Description
    string

    BarHeight

    Gets or sets the height of the bars in SVG units (viewBox units). Default is 50.

    Declaration
    [Parameter]
    public double BarHeight { get; set; }
    Property Value
    Type Description
    double

    FontSize

    Gets or sets the font size for layout calculations of the value text (in SVG viewBox units). This is not automatically applied as an SVG attribute; use ValueStyle to style the text.

    Declaration
    [Parameter]
    public double FontSize { get; set; }
    Property Value
    Type Description
    double

    Foreground

    Gets or sets the barcode bars color.

    Declaration
    [Parameter]
    public string Foreground { get; set; }
    Property Value
    Type Description
    string

    Height

    Gets or sets the rendered height of the SVG. Accepts CSS units (e.g. "80px"). If ShowValue is true, the text is drawn inside this height.

    Declaration
    [Parameter]
    public string Height { get; set; }
    Property Value
    Type Description
    string

    QuietZoneModules

    Gets or sets the quiet zone in modules (left and right padding).

    Declaration
    [Parameter]
    public int QuietZoneModules { get; set; }
    Property Value
    Type Description
    int

    ShowChecksum

    Gets or sets whether to show the checksum (if applicable for the selected Type) under the bars.

    Declaration
    [Parameter]
    public bool ShowChecksum { get; set; }
    Property Value
    Type Description
    bool

    ShowValue

    Gets or sets whether to show the value as text under the bars.

    Declaration
    [Parameter]
    public bool ShowValue { get; set; }
    Property Value
    Type Description
    bool

    TextMarginTop

    Gets or sets the gap between bars and text in SVG units (viewBox units).

    Declaration
    [Parameter]
    public double TextMarginTop { get; set; }
    Property Value
    Type Description
    double

    Type

    Gets or sets the barcode type.

    Declaration
    [Parameter]
    public RadzenBarcodeType Type { get; set; }
    Property Value
    Type Description
    RadzenBarcodeType

    Value

    Gets or sets the barcode value to encode.

    Declaration
    [Parameter]
    public string Value { get; set; }
    Property Value
    Type Description
    string

    ValueStyle

    Gets or sets the value inline CSS style.

    Declaration
    [Parameter]
    public virtual string? ValueStyle { get; set; }
    Property Value
    Type Description
    string

    The value style.

    Width

    Gets or sets the rendered width of the SVG. Accepts CSS units (e.g. "300px", "100%").

    Declaration
    [Parameter]
    public string Width { get; set; }
    Property Value
    Type Description
    string

    Methods

    BuildRenderTree(RenderTreeBuilder)

    A 1D barcode generator component that renders barcodes as SVG graphics. Generates barcodes entirely client-side (no external dependencies).

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    RenderTreeBuilder __builder
    Overrides
    ComponentBase.BuildRenderTree(RenderTreeBuilder)

    GetComponentCssClass()

    Gets the component CSS class.

    Declaration
    protected override string GetComponentCssClass()
    Returns
    Type Description
    string
    Overrides
    RadzenComponent.GetComponentCssClass()

    HasChecksum(RadzenBarcodeType)

    Gets whether the specified barcode type produces a checksum value that can be displayed when ShowChecksum is enabled.

    Declaration
    public static bool HasChecksum(RadzenBarcodeType type)
    Parameters
    Type Name Description
    RadzenBarcodeType type

    The barcode type.

    Returns
    Type Description
    bool

    true if the type has a checksum value; otherwise, false.

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable

    Introducing Radzen Blazor Studio

    Radzen Blazor Studio is a software development environment that empowers developers to design, build and deploy Blazor applications without the traditional hurdles. Write less code and get more done.

    Learn More

    Download Now
    Download Now
    In This Article
    Back to top Radzen Blazor Components, © 2018-2026 Radzen. Source Code licensed under MIT