PrintPaint Method
- Namespace
TXTextControl.WPF. Barcode
- Package
TXTextControl.asTextControl. WPF. SDK TXBarcode.from the private NuGet feed or Text Control Offline PackagesWPF. dll
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);Public Sub PrintPaint(graphics As Graphics, position As Rectangle)| Parameter | Description |
|---|---|
| graphics | Specifies the object of type |
| position | Specifies the position to draw on the specified object of type |
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);Public Sub PrintPaint(drawingContext As DrawingContext, stretchFactor As Double)| Parameter | Description |
|---|---|
| drawingContext | Specifies the object of type |
| stretchFactor | Specifies the stretch factor to draw on the specified object of type |
PrintPaint(Rectangle)
public string PrintPaint(Rectangle rectangle);Public Function PrintPaint(rectangle As Rectangle) As StringExamples
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}");Dim result = tXBarcodeControl.PrintPaint(New System.Drawing.Rectangle(20, 20, 600, 400))
Console.WriteLine($"Print Paint result: {result}")