QRCodeOptions Class
Options for the creation of standard QR codes by QRCode.Create.
public sealed class QRCodeOptionsRemarks
The version sets the number of modules of the symbol (17 + 4 × version per side), not the size of the image: the ModuleSize of the renderers sets how many pixels or units a module takes.
Constructors
| Name | Description |
|---|---|
| QRCodeOptions() |
QRCodeOptions()
QRCodeOptions.cspublic QRCodeOptions()No documentation is available.
Properties
| Name | Description |
|---|---|
| EciAssignmentNumber | Gets or sets the ECI (Extended Channel Interpretation) assignment number declared at the start of the data, so that readers know the character encoding of its bytes instead of guessing it. The default is null: no ECI designator. |
| MaximumVersion | Gets or sets the largest version the symbol can have, from 1 (21 × 21 modules) to 40 (177 × 177 modules). The default is 40. |
| MinimumVersion | Gets or sets the smallest version the symbol can have, from 1 (21 × 21 modules) to 40 (177 × 177 modules). The default is 1. |
EciAssignmentNumber
QRCodeOptions.csGets or sets the ECI (Extended Channel Interpretation) assignment number declared at the start of the data, so that readers know the character encoding of its bytes instead of guessing it. The default is null: no ECI designator.
public int? EciAssignmentNumber { get; set; }Property value
Exceptions
ArgumentOutOfRangeException- The value is negative or greater than 999999.
Remarks
A text is encoded as UTF-8, so the only assignment number it accepts is QRCodeOptions.Utf8EciAssignmentNumber. Binary data accepts any assignment number from 0 to 999999, such as 3 for ISO-8859-1.
The designator takes 12 to 28 bits, which can give a larger symbol. With an ECI designator, a text is never encoded in Kanji mode (its kanji and kana are UTF-8, like the other characters).
MaximumVersion
QRCodeOptions.csGets or sets the largest version the symbol can have, from 1 (21 × 21 modules) to 40 (177 × 177 modules). The default is 40.
public int MaximumVersion { get; set; }Property value
Exceptions
ArgumentOutOfRangeException- The value is less than 1 or greater than 40.
Remarks
Data that does not fit in this version throws an InvalidOperationException, instead of giving a larger symbol.
MinimumVersion
QRCodeOptions.csGets or sets the smallest version the symbol can have, from 1 (21 × 21 modules) to 40 (177 × 177 modules). The default is 1.
public int MinimumVersion { get; set; }Property value
Exceptions
ArgumentOutOfRangeException- The value is less than 1 or greater than 40.
Remarks
The symbol has the smallest version from QRCodeOptions.MinimumVersion to QRCodeOptions.MaximumVersion that holds the data. Set both to the same value to get a symbol of that exact version: data shorter than its capacity is padded.
Constants
| Name | Description |
|---|---|
| Utf8EciAssignmentNumber | The ECI assignment number of UTF-8 (26). |
Utf8EciAssignmentNumber
The ECI assignment number of UTF-8 (26).
public const int Utf8EciAssignmentNumber = 26