TX Text Control .NET for WPF

SizeToContent 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

If any changes of the the displayed shapes' visible bounds require an adaption of the TX Drawing Control bounds, the size and/or location of the control is expanded respectively decreased by the considering value of the considering shape's side(s). The method returns an array of doubles which represent the effected alteration for each control's side (left, top, right, bottom) in twips.

Syntax

public int[] SizeToContent();

Return Value

An array of doubles which represent the effected alteration for each control's side (left, top, right, bottom) in Twips.

Examples

The following example uses Size To Content in a focused TXDrawing Control workflow.

int[] results = tXDrawingControl.SizeToContent();
foreach (int int32 in results)
{
    Console.WriteLine(int32);
}