TX Text Control .NET for WPF

PrintPaint Method

Method|Introduced in 29.0
Namespace
TXTextControl.WPF.Barcode
Package
TXTextControl.TextControl.WPF.SDK as TXBarcode.WPF.dll from the private NuGet feed or Text Control Offline Packages

Description

Draws the barcode on a specific object of type System.Drawing.Graphics or System.Windows.Media.DrawingContext with specified bounds or stretch factor.

Syntax

PrintPaint(Graphics, Rectangle)

Draws the barcode on a specific object of type System.Drawing.Graphics with the specified bounds. The parameter position must be an object of type System.Drawing.Rectangle.

public void PrintPaint(Graphics graphics, Rectangle position);
ParameterDescription
graphics

Specifies the object of type System.Drawing.Graphics on which the barcode is drawn.

position

Specifies the position to draw on the specified object of type System.Drawing.Graphics.

PrintPaint(DrawingContext, double)

Draws the barcode on a specific object of type System.Windows.Media.DrawingContext with the specified stretch factor.

public void PrintPaint(DrawingContext drawingContext, double stretchFactor);
ParameterDescription
drawingContext

Specifies the object of type System.Windows.Media.DrawingContext on which the barcode is drawn.

stretchFactor

Specifies the stretch factor to draw on the specified object of type System.Windows.Media.DrawingContext.

PrintPaint(Rectangle)

public string PrintPaint(Rectangle rectangle);

Examples

The following example uses Print Paint in a focused TXBarcode Control workflow.

var result = tXBarcodeControl.PrintPaint(new System.Drawing.Rectangle(20, 20, 600, 400));
Console.WriteLine($"Print Paint result: {result}");