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.
For detailed documentation on this symbology's features and how to use them, please see the QrCode documentation topic.
Constructors
QrCodeSymbology()
Initializes a new instance of the QrCodeSymbology class.
public QrCodeSymbology()
Properties
AllowLowercase
Gets or sets a value indicating whether lowercase characters are allowed. This is a dependency property.
public bool AllowLowercase { get; set; }
Property Value
- bool:
true
if lowercase characters are allowed; otherwise,false
will 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
Gets or sets the Extended Channel Interpretation (ECI) mode used to encode the specified value, when the EncodingMode resolves to Binary. This is a dependency property.
public EciMode? EciMode { get; set; }
Property Value
- EciMode?:
The Extended Channel Interpretation (ECI) mode. The default value is
null
, which indicates the ECI mode will be auto-selected based on the specified value.
EncodingMode
Gets or sets the mode used to encode the specified value. This is a dependency property.
public QrEncodingMode? EncodingMode { get; set; }
Property Value
- QrEncodingMode?:
The QR encoding mode. The default value is
null
, which indicates the encoding mode will be auto-selected based on the specified value.
ErrorCorrectionLevel
Gets or sets 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. This is a dependency property.
public QrErrorCorrectionLevel ErrorCorrectionLevel { get; set; }
Property Value
- QrErrorCorrectionLevel:
The error correction level.
MaskIndex
Gets or sets the QR mask applied to the code. This is a dependency property.
public int? MaskIndex { get; set; }
Property Value
- int?:
The QR mask applied to the code. The default value is
null
, which indicates the mask will be auto-selected based on the specified value.
Version
Gets or sets the version of the QR symbol. This value determines the number of modules that compose the symbol, thus contributing to the maximum amount of data that can be encoded. This is a dependency property.
public QrVersion? Version { get; set; }
Property Value
- QrVersion?:
The version of the QR symbol. 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
Identifies the AllowLowercase dependency property. This field is read-only.
public static readonly DependencyProperty AllowLowercaseProperty
EciModeProperty
Identifies the EciMode dependency property. This field is read-only.
public static readonly DependencyProperty EciModeProperty
EncodingModeProperty
Identifies the EncodingMode dependency property. This field is read-only.
public static readonly DependencyProperty EncodingModeProperty
ErrorCorrectionLevelProperty
Identifies the ErrorCorrectionLevel dependency property. This field is read-only.
public static readonly DependencyProperty ErrorCorrectionLevelProperty
MaskIndexProperty
Identifies the MaskIndex dependency property. This field is read-only.
public static readonly DependencyProperty MaskIndexProperty
VersionProperty
Identifies the Version dependency property. This field is read-only.
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