/// <summary> /// Returns a string representation of <see cref="QRErrorCorrectionLevel"/> enum value. /// </summary> /// <param name="item">An enum value.</param> /// <returns>A string representation of enum value.</returns> internal static string QRErrorCorrectionLevelToString(QRErrorCorrectionLevel item) { switch (item) { case QRErrorCorrectionLevel.L: return("L"); case QRErrorCorrectionLevel.M: return("M"); case QRErrorCorrectionLevel.Q: return("Q"); case QRErrorCorrectionLevel.H: return("H"); } return(null); }
/// <summary> /// Sets the error correction level of the QR code. /// </summary> /// <param name="errorCorrection">The QR code error correction level.</param> /// <example> /// <code lang="Razor"> /// @(Html.Kendo().QRCode() /// .Name("qrCode") /// .ErrorCorrection(QRErrorCorrectionLevel.Q) /// ) /// </code> /// <code lang="ASPX"> /// <%:Html.Kendo().QRCode() /// .Name("qrCode") /// .ErrorCorrection(QRErrorCorrectionLevel.Q) /// %> /// </code> /// </example> public QRCodeBuilder ErrorCorrection(QRErrorCorrectionLevel errorCorrection) { Component.ErrorCorrection = errorCorrection; return(this); }