Overview
Both controls hand Value to ZXing.Net and render the result as an <svg role="img">, so there is
no image request and the code scales with its box. A value the symbology cannot encode shows the encoder's message in place of the
code instead of throwing. BarcodeControl picks the symbology with Type; QrCodeControl takes a
Size and an ErrorCorrection level.
Documentation
BarcodeControl parameters
| Parameter | Type | Default | Description |
Value | string | "FLEX-12345" | Text to encode. Empty renders nothing. |
Type | BarcodeType | Code128 | Symbology; see the table below. |
ShowText | bool | true | Draws the value under the bars. |
ForegroundColor / BackgroundColor | string | #000000 / #ffffff | Bar and text colour; background rectangle. Any CSS colour. |
BarHeight | int | 50 | Bar height in SVG units (pixels at default size); at least 1. |
Width / Height | string? | null | CSS size of the SVG. Unset means the natural size: one unit per module plus 20 units of quiet zone in total, and the bar height plus 27 (text) or 10. |
AriaLabel | string? | null | Overrides the default "Type barcode: value". |
CssClass / Style (base) | string? | null | On the fx-barcode frame. Visible from the base is not applied. |
(unmatched attributes) | Dictionary<string,object> | — | Forwarded to the frame <div>. |
BarcodeType
| Property | Type | Default | Description |
Code128 | | — | Any ASCII text; the densest general-purpose choice. |
Code39 | | — | Upper-case letters, digits and - . $ / + % and space. |
Code93 | | — | Same character set as Code 39, more compact. |
Ean8 / Ean13 | | — | 7 or 8 digits; 12 or 13 digits. The check digit is computed when omitted and verified when given. |
UpcA / UpcE | | — | 11 or 12 digits; 7 or 8 digits. |
Itf | | — | Digits, even count (Interleaved 2 of 5). |
Codabar | | — | Digits and - $ : / . +; A–D start and stop characters are optional and added when missing. |
QrCodeControl parameters
| Parameter | Type | Default | Description |
Value | string | "FlexCore" | Text to encode, UTF-8. Empty renders nothing. |
Size | int | 150 | Rendered width and height in pixels; the module count comes from the text length and level. |
ForegroundColor / BackgroundColor | string | #000000 / #ffffff | Module and background colour. |
ErrorCorrection | QrErrorCorrectionLevel | Medium | Redundancy level; see below. |
AriaLabel | string? | null | Overrides the default "QR code: value". |
CssClass / Style (base) | string? | null | On the fx-qrcode frame. |
QrErrorCorrectionLevel
| Property | Type | Default | Description |
Low | | — | About 7% of the symbol can be unreadable. |
Medium | | — | About 15%. |
Quartile | | — | About 25%. |
High | | — | About 30%; the largest symbol for a given text. |
Read-only properties
| Method | Inputs | Returns | Description |
BarcodeControl.ErrorMessage | — | string? | "Cannot encode Type barcode: …" from the encoder, or null. |
QrCodeControl.ErrorMessage | — | string? | "Cannot encode QR code: …", or null. |
CSS classes
| Class | Effect |
fx-barcode · fx-barcode-error | White rounded frame with a hairline border and light shadow; the error text inside it. |
fx-qrcode · fx-qrcode-error | Same frame with an 8px radius; the error text inside it. |
Neither stylesheet reads a --fx-* variable. Colours of the code itself come from ForegroundColor and BackgroundColor; the frame is fixed in CSS.
Keyboard and accessibility
- The SVG is
role="img" with an aria-label that defaults to "Type barcode: value" or "QR code: value". Set AriaLabel when the value is not meaningful to read out.
- An encoding error renders as
role="alert" text inside the frame.
- Nothing here is focusable or interactive; the controls above the codes are ordinary FlexCore inputs.
- The barcode's human-readable text is drawn inside the SVG at 11px monospace; it is not selectable. Print the value next to the code if users must copy it.