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

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

    Namespace: DevExpress.Docs.Barcode

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

    Declaration

    public class RectangleQRFrameOptions :
        QRFrameOptions

    Remarks

    Use the CornerQRFrameOptions to create a rectangular frame around a QR code.

    The following code example creates a GS1 QR code with rectangular frame options:

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

    Inheritance

    Object
    QRFrameOptions
    RectangleQRFrameOptions
    See Also