In This Article

Grid2DBarCodeSymbology Class

Provides the base class for a two dimensional grid bar code symbology.

public abstract class Grid2DBarCodeSymbology : BarCodeSymbology
Inheritance:
object Visual UIElement FrameworkElement BarCodeSymbology object
Derived:
QrCodeSymbology

Remarks

For detailed documentation on this symbology's features and how to use them, please see the Bar Code Symbology-related series of documentation topics.

Constructors

Grid2DBarCodeSymbology()

Initializes an instance of the class.

protected Grid2DBarCodeSymbology()

Properties

CellSize

Gets or sets the number of pixels wide and high that each cell of the symbol grid should be when rendered. This is a dependency property.

public int CellSize { get; set; }

Property Value

int:

The size of the cell.

GridData

Gets or sets an two dimensional array of boolean values that specifies how the symbol is to be rendered.

protected bool[,] GridData { get; set; }

Property Value

bool[,]:

The grid data.

QuietZoneThickness

Gets or sets the thickness of the margin on each side of the rendered symbol. This is a dependency property.

public Thickness QuietZoneThickness { get; set; }

Property Value

Thickness:

The quiet zone.

Methods

MeasureOverride(Size)

When overridden in a derived class, measures the size in layout required for child elements and determines a size for the FrameworkElement-derived class.

protected override Size MeasureOverride(Size availableSize)
Parameter Type Description
availableSize Size

The available size that this element can give to child elements. Infinity can be specified as a value to indicate that the element will size to whatever content is available.

Returns

Size:

The size that this element determines it needs during layout, based on its calculations of child element sizes.

Render(DrawingContext, Point, Size)

Renders the symbology to the specified DrawingContext.

public override void Render(DrawingContext drawingContext, Point location, Size size)
Parameter Type Description
drawingContext DrawingContext

The DrawingContext upon which to render the symbology.

location Point

The location at which to draw the bar code.

size Size

The size of the bar code to draw.

Fields

CellSizeProperty

Identifies the CellSize dependency property. This field is read-only.

public static readonly DependencyProperty CellSizeProperty

GridDataProperty

Identifies the GridData dependency property. This field is read-only.

protected static readonly DependencyProperty GridDataProperty

QuietZoneThicknessProperty

Identifies the QuietZoneThickness dependency property. This field is read-only.

public static readonly DependencyProperty QuietZoneThicknessProperty

Inherited Members