QrCodeSymbology Class
Represents a bar code symbology implementation for QrCode.
public class QrCodeSymbology : Grid2DBarCodeSymbology
- Inheritance:
- object Visual UIElement FrameworkElement BarCodeSymbology Grid2DBarCodeSymbology object
Remarks
QR Code is a two dimensional grid symbology, developed in 1994 by Denso. It was initially intended for use in production control of automotive parts, but it has become widespread in other fields.
This symbology can encode a maximum of 7089 numerical characters, 4296 alphanumeric characters, 2953 binary characters, or 1817 Kanji characters.
Constructors
QrCodeSymbology()
Initializes an instance of the class.
public QrCodeSymbology()
Properties
AllowLowercase
Indicates whether lowercase characters are allowed.
public bool AllowLowercase { get; set; }
Property Value
- bool:
trueif lowercase characters are allowed; otherwise,falsewill force all lowercase characters to be uppercase. The default value isfalse.
Remarks
The QR code specification does not allow lowercase characters when using the alphanumeric encoding mode. Therefore, when allowing lowercase characters the binary encoding mode must be used.
EciMode
The Extended Channel Interpretation (ECI) mode used to encode the specified value, when the EncodingMode resolves to Binary.
public EciMode? EciMode { get; set; }
Property Value
- EciMode?:
The default value is
null, which indicates the ECI mode will be auto-selected based on the specified value.
EncodingMode
The mode used to encode the specified value.
public QrEncodingMode? EncodingMode { get; set; }
Property Value
- QrEncodingMode?:
The default value is
null, which indicates the encoding mode will be auto-selected based on the specified value.
ErrorCorrectionLevel
The percentage of data loss that can occur on a symbol before it becomes unreadable. As the error correction level increases, the amount of data that can be encoded decreases.
public QrErrorCorrectionLevel ErrorCorrectionLevel { get; set; }
Property Value
- QrErrorCorrectionLevel:
The error correction level.
MaskIndex
The QR mask applied to the code.
public int? MaskIndex { get; set; }
Property Value
- int?:
The default value is
null, which indicates the mask will be auto-selected based on the specified value.
Version
The version of the QR symbol, which determines the number of modules that compose the symbol, thus contributing to the maximum amount of data that can be encoded.
public QrVersion? Version { get; set; }
Property Value
- QrVersion?:
The default value is
null, which indicates the version will be auto-selected based on the specified value.
Methods
OnValueChanged(string?, string?)
Occurs when the value of the Value property is changed.
protected override void OnValueChanged(string? oldValue, string? newValue)
| Parameter | Type | Description |
|---|---|---|
| oldValue | string | The old value. |
| newValue | string | The new value. |
ValidateValue(string?)
Validates that the symbology can parse the specified value.
public override ValidationResult ValidateValue(string? value)
| Parameter | Type | Description |
|---|---|---|
| value | string | The value to validate. |
Returns
- ValidationResult:
A ValidationResult containing the result of the validation.
Fields
AllowLowercaseProperty
Defines the AllowLowercase property.
public static readonly DependencyProperty AllowLowercaseProperty
EciModeProperty
Defines the EciMode property.
public static readonly DependencyProperty EciModeProperty
EncodingModeProperty
Defines the EncodingMode property.
public static readonly DependencyProperty EncodingModeProperty
ErrorCorrectionLevelProperty
Defines the ErrorCorrectionLevel property.
public static readonly DependencyProperty ErrorCorrectionLevelProperty
MaskIndexProperty
Defines the MaskIndex property.
public static readonly DependencyProperty MaskIndexProperty
VersionProperty
Defines the Version property.
public static readonly DependencyProperty VersionProperty
Inherited Members
- Grid2DBarCodeSymbology.CellSizeProperty
- Grid2DBarCodeSymbology.GridDataProperty
- Grid2DBarCodeSymbology.QuietZoneThicknessProperty
- Grid2DBarCodeSymbology.MeasureOverride(Size)
- Grid2DBarCodeSymbology.Render(DrawingContext, Point, Size)
- Grid2DBarCodeSymbology.CellSize
- Grid2DBarCodeSymbology.GridData
- Grid2DBarCodeSymbology.QuietZoneThickness
- BarCodeSymbology.BackgroundProperty
- BarCodeSymbology.ForegroundProperty
- BarCodeSymbology.ValueProperty
- BarCodeSymbology.MeasureDesiredSize(Size)
- BarCodeSymbology.OnRender(DrawingContext)
- BarCodeSymbology.ToBitmap(double, double)
- BarCodeSymbology.Background
- BarCodeSymbology.DisplayName
- BarCodeSymbology.Foreground
- BarCodeSymbology.Value