# AutoSize Class

> The AutoSize class is used with the TextControl.AutoControlSize property, to enable automatic expansion or shrinking of a Text Control's width or height. Additionally, it contains properties for setting maximum and minimum values. Automatic expansion or shrinking is only possible, if the TextControl.ViewMode property has been set to SimpleControl.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 11.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl > AutoSize Class
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/autosize/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/autosize/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/autosize/llms-full.txt

---

## On This Page

- [Description](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/autosize/#description)
- [Syntax](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/autosize/#syntax)
- [Examples](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/autosize/#examples)
- [Members](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/autosize/#members)

---

## In This Section

- [AutoSize.AutoExpand Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/autosize/autoexpand-property/llms.txt): Gets or sets possible directions for expanding the control.
- [AutoSize.AutoShrink Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/autosize/autoshrink-property/llms.txt): Gets or sets possible directions for shrinking the control.
- [AutoSize Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/autosize/constructor/llms.txt): Initializes a new instance of the AutoSize class. The constructor offers the individual setting of all features.
- [AutoSize.MaxSize Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/autosize/maxsize-property/llms.txt): Gets or sets the maximum size, in pixels, for expanding the control. A control's width or hight cannot be larger than short.MaxValue.
- [AutoSize.MinSize Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/autosize/minsize-property/llms.txt): Gets or sets the minimum size, in pixels, for shrinking the control. A control's width or hight cannot be smaller than the region covered by one character, so that at least one character remains visible.

---

## Nearby

- **Previous:** [ApplicationFieldFormat Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/applicationfieldformat/enumeration/llms.txt)
- **Next:** [AutoSize.AutoExpand Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/autosize/autoexpand-property/llms.txt)
