Skip to main content
All docs
V26.1
  • CornerQRFrameOptions Class

    Contains options that customize a frame and associated text around a QR code.

    Namespace: DevExpress.Docs.Barcode

    Assembly: DevExpress.Docs.Core.v26.1.dll

    Declaration

    public class CornerQRFrameOptions :
        QRFrameOptions

    Remarks

    Use the RectangleQRFrameOptions to create a rectangular frame around a QR code. The following code snippet creates a QR code with corner frames and text:

    using DevExpress.Docs.Barcode;
    using DevExpress.Drawing;
    using System.Diagnostics;
    using System.Drawing;
    
    var qrCode = QRCodeOptionsBuilder.Create()
    
        .WithErrorCorrectionLevel(QRCodeErrorCorrectionLevel.M)
        .WithCompactionMode(QRCodeCompactionMode.Auto)
        .WithIncludeQuietZone(true)
        .WithLogo(DXImage.FromStream(new FileStream("logo.png", FileMode.Open)))
        .WithFrameOptions(new CornerQRFrameOptions
        {
            FrameWidth = 10,
            FrameColor = Color.FromArgb(255, 0, 0, 255),
            Text = "Scan me",
            TextPosition = QRFrameTextPosition.Left,
        })
        .Build();
    
    var filePath = Path.GetFullPath("gs1_img.png");
    
    using var generator = new BarcodeGenerator(qrCode);
    generator.ExportToImage("https://www.devexpress.com").Save(filePath, DXImageFormat.Png);
    
    Process.Start(new ProcessStartInfo(filePath) { UseShellExecute = true });
    

    Inheritance

    Object
    QRFrameOptions
    CornerQRFrameOptions
    See Also