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

Constructors

Grid2DBarCodeSymbology()

Initializes an instance of the class.

protected Grid2DBarCodeSymbology()

Properties

CellSize

The number of pixels wide and high that each cell of the symbol grid should be when rendered.

public int CellSize { get; set; }

Property Value

int

GridData

A two dimensional array of boolean values that specifies how the symbol is to be rendered.

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

Property Value

bool[,]

QuietZoneThickness

The thickness of the margin on each side of the rendered symbol.

public Thickness QuietZoneThickness { get; set; }

Property Value

Thickness

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

Defines the CellSize property.

public static readonly DependencyProperty CellSizeProperty

GridDataProperty

Defines the GridData property.

protected static readonly DependencyProperty GridDataProperty

QuietZoneThicknessProperty

Defines the QuietZoneThickness property.

public static readonly DependencyProperty QuietZoneThicknessProperty

Inherited Members

Extension Methods