TX Text Control .NET for Windows Forms

AutoControlSize Property

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

Description

Gets or sets values that enable automatic expansion or shrinking of a Text Control's width or height depending on the currently contained text. These features are only possible, if the TextControl.ViewMode property has been set to SimpleControl. The property value is an object of the type AutoSize.

Syntax

public AutoSize AutoControlSize { get; set; }

Examples

The following example uses TextControl.AutoControlSize to configure auto control size as part of the text control workflow. The change is then applied to the active document or user interface.

textControl.AutoControlSize = new AutoSize();
textControl.Update();