A lot of times it is useful to be able to render a bar code directly onto a WPF DrawingContext
. This can be done simply by calling the Render method of the desired symbology class.
Measuring the Bar Code
You can retrieve a Size
measurement of the bar code for a symbology by calling its Bar
This sample code measures the bar code symbology in the variable symbology
.
Rendering the Bar Code
You can render the bar code for a symbology by calling its BarDrawingContext
, location and size.
The Size
should be the same size that is retrieved from the Measure
This sample code renders the bar code symbology to a DrawingContext
.