TX Text Control .NET for Windows Forms

FitToCanvas Method

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

Description

Expands the shape to the control's canvas size. The method has no effect if the CanFitToCanvas property returns false.

Syntax

public void FitToCanvas();

Examples

The following example uses Fit To Canvas in a focused Shape workflow. The created object is then available to the surrounding document workflow.

shape.FitToCanvas();
Console.WriteLine("Shape is ready for use.");