TX Text Control .NET for WPF

AutoControlSize Property

Property|Introduced in 16.0
Namespace
TXTextControl.WPF
Package
TXTextControl.TextControl.WPF.SDK as TXTextControl.WPF.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 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 configured value is checked before the workflow continues.

textControl.AutoControlSize = new AutoSize();
if (textControl.AutoControlSize != null)
{
    Console.WriteLine("Text Control: Auto Control Size is available.");
}