QRCodeTagHelper
Kendo UI QRCode TagHelper QRCodeTagHelper class.
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
[HtmlTargetElement("kendo-qrcode")]
[RestrictChildren("border", new string[] { "overlay" })]
public class QRCodeTagHelper : TagHelperBase, ITagHelper, ITagHelperComponent
Inheritance: objectTagHelperTagHelperBaseQRCodeTagHelper
Implements:
Inherited Members
Example:
@addTagHelper *, Kendo.Mvc
<kendo-qrcode name="qrcode" background="#ffcc00" value="https://example.com">
</kendo-qrcode>
Child Tags
Constructors
Initializes a new instance of the QRCodeTagHelper class.
Properties
The background color of the QR code. Accepts a valid CSS color string, including hex and rgb.
public string Background { get; set; }
The color of the QR code. Accepts a valid CSS color string, including hex and rgb.
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. or "UTF_8" - supports all Unicode characters..
public QREncoding? 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..
public QRErrorCorrectionLevel? ErrorCorrection { get; set; }
Sets the minimum distance in pixels that should be left between the border and the QR modules.
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.
public RenderingMode? RenderAs { get; set; }
Specifies the size of a QR code in pixels (i.e. "200px"). Numeric values are treated as pixels. If no size is specified, it will be determined from the element width and height. In case the element has width or height of zero, a default value of 200 pixels will be used.
public double? Size { get; set; }
Methods
Gets the initialization script.
protected override string GetInitializationScript()
The initialization script.
Overrides:
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Overrides:
Serializes the defined settings.
public override IDictionary<string, object> Serialize()
Overrides:
SerializeEvents method.
protected override Dictionary<string, object> SerializeEvents()
Overrides:
SerializeSettings method.
protected override Dictionary<string, object> SerializeSettings()
Overrides:
Writes the HTML output.
protected override void WriteHtml(TagHelperOutput output)
The TagHelper output.
Overrides: