TX Text Control .NET for WPF

SetCanvasSize Method

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

Description

Specifies, pursuant to a ZoomFactor value of 100, the height and width of the canvas. The parameters must be given in twips.

Syntax

public void SetCanvasSize(double width, double height);

Parameters

ParameterDescription
width

Specifies the width of the canvas.

height

Specifies the height of the canvas.

Examples

The following example uses Set Canvas Size in a focused TXDrawing Control workflow. The created object is then available to the surrounding document workflow.

tXDrawingControl.SetCanvasSize(1.0, 1.0);
Console.WriteLine("TXDrawing Control is ready for use.");