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

Defines the fluent interface for configuring the QRCode component.

Definition

Constructors

Initializes a new instance of the QRCodeBuilder class.

C#
public QRCodeBuilder(QRCode component)
Parameters:componentQRCode

The component.

Example:
C#
@(Html.Kendo().QRCode()
.Name("qrCode")
.Padding(5)
)

Methods

Sets the background color of the QR code.

C#
public QRCodeBuilder Background(string color)
Parameters:colorstring

The QR code background color.

Returns:

QRCodeBuilder

Example:
C#
@(Html.Kendo().QRCode()
.Name("qrCode")
.Background("red")
)

Sets the border configuration of the QRCode.

C#
public QRCodeBuilder Border(Action<QRBorderBuilder> configurator)
Parameters:configuratorAction<QRBorderBuilder>

The lambda which configures the border.

Returns:

QRCodeBuilder

Example:
C#
@(Html.Kendo().QRCode()
.Name("qrCode")
.Border(border =&gt;
// configure the border
border
.Color("black")
.Width(5)
)
)

Sets the border width and color of the QR code.

C#
public QRCodeBuilder Border(string color, int width)
Parameters:colorstring

The QR code border color.

widthint

The QR code border width.

Returns:

QRCodeBuilder

Example:
C#
@(Html.Kendo().QRCode()
.Name("qrCode")
.Border("black", 5)
)

Sets the color of the QR code.

C#
public QRCodeBuilder Color(string color)
Parameters:colorstring

The QR code color.

Returns:

QRCodeBuilder

Example:
C#
@(Html.Kendo().QRCode()
.Name("qrCode")
.Color("blue")
)

Sets the encoding of the QR code.

C#
public QRCodeBuilder Encoding(QREncoding encoding)
Parameters:encodingQREncoding

The QR code encoding.

Returns:

QRCodeBuilder

Example:
C#
@(Html.Kendo().QRCode()
.Name("qrCode")
.Encoding(QREncoding.UTF_8)
)

Sets the error correction level of the QR code.

C#
public QRCodeBuilder ErrorCorrection(QRErrorCorrectionLevel errorCorrection)
Parameters:errorCorrectionQRErrorCorrectionLevel

The QR code error correction level.

Returns:

QRCodeBuilder

Example:
C#
@(Html.Kendo().QRCode()
.Name("qrCode")
.ErrorCorrection(QRErrorCorrectionLevel.Q)
)

The overlay configuration which alows you to choose from predefined layouts or insert a custom image.

C#
public QRCodeBuilder Overlay(Action<QRCodeOverlayBuilder> configurator)
Parameters:configuratorAction<QRCodeOverlayBuilder>

The configurator for the overlay setting.

Returns:

QRCodeBuilder

Example:
C#
@(Html.Kendo().QRCode()
.Name("qrCode")
.Overlay(o=&gt;o.Width(200))
)

Sets the padding of the QR code.

C#
public QRCodeBuilder Padding(int padding)
Parameters:paddingint

The QR padding.

Returns:

QRCodeBuilder

Example:
C#
@(Html.Kendo().QRCode()
.Name("qrCode")
.Padding(5)
)
C#
public QRCodeBuilder RenderAs(RenderingMode renderAs)
Parameters:renderAsRenderingModeReturns:

QRCodeBuilder

Sets the size of the QR code.

C#
public QRCodeBuilder Size(int size)
Parameters:sizeint

The QR code size.

Returns:

QRCodeBuilder

Example:
C#
@(Html.Kendo().QRCode()
.Name("qrCode")
.Size(170)
)

Sets the value of the QR code.

C#
public QRCodeBuilder Value(string value)
Parameters:valuestring

The QR value.

Returns:

QRCodeBuilder

Example:
C#
@(Html.Kendo().QRCode()
.Name("qrCode")
.Value("Hello world")
)