# AutoSizeMode

Namespace: **Wisej.Web**

Assembly: **Wisej.Framework** (4.0.0.0)

Specifies how a control will behave when its [AutoSize](https://docs.wisej.com/api/general/control#autosize) property is enabled.

{% tabs %}
{% tab title="C#" %}

```csharp
public enum AutoSizeMode : Enum
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Enum AutoSizeMode As [Enum]
```

{% endtab %}
{% endtabs %}

## Fields

| Name              | Description                                                                                                                                                                                                                                                                           |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **GrowAndShrink** | The control grows or shrinks to fit its contents. The control cannot be resized manually.                                                                                                                                                                                             |
| **GrowOnly**      | The control grows as much as necessary to fit its contents but does not shrink smaller than the value of its [Size](https://docs.wisej.com/api/general/control#size) property. The control can be resized, but cannot be made so small that any of its contained controls are hidden. |

## Used By

| Name                                                                                                                                                     | Description                                                                                                                                                                   |
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Button.AutoSizeMode](https://docs.wisej.com/api/buttons/button#autosizemode)                                                                            | Returns or sets the mode by which the [Button](https://docs.wisej.com/api/wisej.web/buttons/button) automatically resizes itself.                                             |
| [Form.AutoSizeMode](https://docs.wisej.com/api/containers/form#autosizemode)                                                                             | Indicates the automatic sizing behavior of the control.                                                                                                                       |
| [GroupBox.AutoSizeMode](https://docs.wisej.com/api/containers/wisej.web.groupbox#autosizemode)                                                           | Returns or sets the mode by which the [Button](https://docs.wisej.com/api/wisej.web/buttons/button) automatically resizes itself.                                             |
| [Panel.AutoSizeMode](https://docs.wisej.com/api/containers/wisej.web.panel#autosizemode)                                                                 | Indicates the automatic sizing behavior of the control.                                                                                                                       |
| [UserControl.AutoSizeMode](https://docs.wisej.com/api/containers/wisej.web.usercontrol#autosizemode)                                                     | Returns or sets how the control will resize itself.                                                                                                                           |
| [ButtonExtensions.AutoSizeMode](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.buttonextensions#autosizemode-button-mode)       | Sets the AutoSizeMode property of the specified [Button](https://docs.wisej.com/api/wisej.web/buttons/button).                                                                |
| [GroupBoxExtensions.AutoSizeMode](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.groupboxextensions#autosizemode-groupbox-mode) | Sets the AutoSizeMode property of the specified [GroupBox](https://docs.wisej.com/api/wisej.web/containers/wisej.web.groupbox).                                               |
| [FormExtensions.AutoSize](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.formextensions#autosize-form-autosize-mode)            | Sets the AutoSize property and AutoSizeMode for the specified [Form](https://docs.wisej.com/api/wisej.web/containers/form) control, enabling or disabling automatic resizing. |
