Skip to main content
All docs
V24.1

QRCodeGenerator.FrameOptions Property

Gets or sets the frame for QR codes.

Namespace: DevExpress.XtraPrinting.BarCode

Assembly: DevExpress.Printing.v24.1.Core.dll

NuGet Package: DevExpress.Printing.Core

Declaration

[TypeConverter(typeof(LocalizableExpandableObjectTypeConverter))]
[XtraSerializableProperty(XtraSerializationVisibility.Content, true)]
public virtual QRFrameOptions FrameOptions { get; set; }

Property Value

Type Description
QRFrameOptions

A QRFrameOptions object that defines the frame options.

Remarks

QR Code, GS1 QR Code, EPC QR Code support the following frames (the QRFrameOptions descendants):

In the Visual Studio Report Designer, go to BehaviorSymbologyFrameOptions, select the frame type, and specify the available properties:

QR Frame design time options

To add a new frame in code, select one of the frame types and assign its new instance to the QR code’s QRCodeGenerator.FrameOptions property:

using DevExpress.XtraPringing.BarCode;

public XRBarCode CreateQRCodeBarCode(string BarCodeText) {
    // Create a barcode control.
    XRBarCode barCode = new XRBarCode();

    // Set the barcode's type to QRCode.
    barCode.Symbology = new QRCodeGenerator();

    // ...

    // Set a rectangular frame and specifies its options.
    RectangleQRFrameOptions frameOpt = new RectangleQRFrameOptions() {
        FrameWidth = 2,
        FrameColor = System.Drawing.Color.DarkRed,                
        Text = "Scan me",
        TextAlignment = QRFrameTextAlignment.Baseline,
        TextPosition = QRFrameTextPosition.Top,
        CornerRadius = 5
    };
    ((QRCodeGenerator)barCode.Symbology).FrameOptions = frameOpt;

    return barCode;
}

The resulted frame:

qr-code-rectangle-frame

See Also