TX Text Control .NET for Windows Forms

PrintPaint Method

Method|Introduced in 23.0
Namespace
TXTextControl.Drawing
Package
TXTextControl.TextControl.WinForms.SDK as TXDrawing.Windows.Forms.dll from the private NuGet feed or Text Control Offline Packages

Description

Renders the displayed shapes on the specified System.Drawing.Graphics object.

Syntax

PrintPaint(Graphics, Rectangle)

Renders only the displayed shapes on the specified System.Drawing.Graphics object. No activated UI elements are rendered.

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

Specifies the object of type System.Drawing.Graphics the displayed shapes are rendered to.

position

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

PrintPaint(Graphics, Rectangle, bool)

Renders the displayed shapes on the specified System.Drawing.Graphics object with or without activated UI elements.

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

Specifies the object of type System.Drawing.Graphics the displayed shapes are rendered to.

position

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

showUIElements

Specifies whether the activated UI elements are rendered on the specified System.Drawing.Graphics object or not.

PrintPaint(Rectangle, bool)

public string PrintPaint(Rectangle position, bool showHandles);

Examples

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

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