# AutoSize.AutoExpand Property

> Gets or sets possible directions for expanding the control.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 11.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.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 Server > Reference > TXTextControl > AutoSize.AutoExpand Property
- **401 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/autosize/autoexpand-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/autosize/autoexpand-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/autosize/autoexpand-property/llms-full.txt

---

### Description

Gets or sets possible directions for expanding the control.

### Syntax

```csharp
public AutoSizeDirection AutoExpand { get; set; }
```

```vbnet
Public Property AutoExpand As AutoSizeDirection
```

### Members

| Value | Description |
|---|---|
| None | The control does not expand automatically. |
| Vertical | The control automatically expands vertically. |
| Horizontal | The control automatically expands horizontally. |
| Both | The control automatically expands in both directions. |

### Examples

The following example uses `AutoSize.AutoExpand` to configure auto expand as part of the auto size workflow. The configured value is checked before the workflow continues.

```csharp
autoSize.AutoExpand = AutoSizeDirection.Vertical;
Console.WriteLine($"Auto Expand used by Auto Size: {autoSize.AutoExpand}");
```

```vbnet
autoSize.AutoExpand = AutoSizeDirection.Vertical
Console.WriteLine($"Auto Expand used by Auto Size: {autoSize.AutoExpand}")
```

---

## Nearby

- **Previous:** [AutoSize Class](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/autosize/llms-full.txt)
- **Next:** [AutoSize.AutoShrink Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/autosize/autoshrink-property/llms-full.txt)
