QRFrameOptions Class
The base class for QR code frame options.
Namespace: DevExpress.Docs.Barcode
Assembly: DevExpress.Docs.Core.v26.1.dll
Declaration
Related API Members
The following members return QRFrameOptions objects:
Remarks
The following frame options are available for QR, QR EPC, and QR GS 1 codes:
- RectangleQRFrameOptions - to display a rectangular frame around the QR code.
- CornerQRFrameOptions - to display corner lines around the QR code.
- PaymentServicesAustriaQRFrameOptions (for QR EPC codes only) - to display a frame that complies with the Payment Services Austria (PSA) guidelines.
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
See Also