New to Telerik UI for BlazorStart a free 30-day trial

A component that renders a QR code from a value with configurable size. Initializes/updates via InitWidgetMethodName and enforces square dimensions: set either Size or equal Width/Height. Serializes the final size for rendering.

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Syntax:

C#
public class TelerikQRCode : DataVizComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseBaseComponentDataVizComponentTelerikQRCode

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members DataVizComponent.Dispose()DataVizComponent.Refresh()DataVizComponent.ChildContentDataVizComponent.WidthDataVizComponent.HeightBaseComponent.ShouldRender()BaseComponent.OnInitializedAsync()BaseComponent.OnAfterRenderAsync(bool)BaseComponent.InitLocalizer()BaseComponent.ThrowIfParameterIsNull(object, string)BaseComponent.HaveOptionsChanged(IDictionary<string, object>, IDictionary<string, object>)BaseComponent.GetClassString(params string[])BaseComponent.InvokeAsync<T>(string, params object[])BaseComponent.InvokeAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidAsync(string, params object[])BaseComponent.InvokeVoidAsyncWithoutAwait(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidComponentMethodAsync(string, params object[])BaseComponent.InvokeComponentVoidMethodAsync(string, object)BaseComponent.InvokeDisposeAsync()BaseComponent.StateHasChanged()BaseComponent.RootComponentBaseComponent.ClassComponentBase.OnParametersSetAsync()ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)ComponentBase.SetParametersAsync(ParameterView)...

Constructors

C#
public TelerikQRCode()

Properties

The background color of the QR code. Accepts a valid CSS color string, including hex and rgb.

C#
[Parameter]
public string Background { get; set; }

The color of the QR code. Accepts a valid CSS color string, including hex and rgb.

C#
[Parameter]
public string Color { get; set; }

The encoding mode used to encode the value. The possible values are: "ISO_8859_1" - supports all characters from the ISO/IEC 8859-1 character set. "UTF_8" - supports all Unicode characters. "UTF_8_NO_BOM" - supports all Unicode characters and does not include a BOM (Byte Order Mark).

C#
[Parameter]
public QRCodeEncoding? Encoding { get; set; }

The error correction level used to encode the value.The possible values are: "L" - approximately 7% of the codewords can be restored.; "M" - approximately 15% of the codewords can be restored.; "Q" - approximately 25% of the codewords can be restored. or "H" - approximately 30% of the codewords can be restored..

C#
[Parameter]
public QRCodeErrorCorrectionLevel? ErrorCorrection { get; set; }

Sets the minimum distance in pixels that should be left between the border and the QR modules.

C#
[Parameter]
public double? Padding { get; set; }

Sets the preferred rendering engine. If it is not supported by the browser, the QRCode 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#
[Parameter]
public RenderingMode? RenderAs { get; set; }

Specifies the size of a QR code in pixels (i.e. "200px").

C#
[Parameter]
public string Size { get; set; }

The value of the QRCode.

C#
[Parameter]
public string Value { get; set; }

Methods

C#
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters:__builderRenderTreeBuilder

Overrides: ComponentBase.BuildRenderTree(RenderTreeBuilder)

C#
protected override void OnAfterRender(bool firstRender)
Parameters:firstRenderbool

Overrides: DataVizComponent.OnAfterRender(bool)

C#
protected override void OnInitialized()

Overrides: DataVizComponent.OnInitialized()

C#
protected override void OnParametersSet()

Overrides: DataVizComponent.OnParametersSet()