# AutoSizeMode

Namespace: **Wisej.Web**

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

Specifies how a control will behave when its [AutoSize](/api/wisej.web/general/control.md#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](/api/wisej.web/general/control.md#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](/api/wisej.web/buttons/button.md#autosizemode)                                                                  | Returns or sets the mode by which the [Button](/api/wisej.web/buttons/button.md) automatically resizes itself.                                             |
| [Form.AutoSizeMode](/api/wisej.web/containers/form.md#autosizemode)                                                                   | Indicates the automatic sizing behavior of the control.                                                                                                    |
| [GroupBox.AutoSizeMode](/api/wisej.web/containers/wisej.web.groupbox.md#autosizemode)                                                 | Returns or sets the mode by which the [Button](/api/wisej.web/buttons/button.md) automatically resizes itself.                                             |
| [Panel.AutoSizeMode](/api/wisej.web/containers/wisej.web.panel.md#autosizemode)                                                       | Indicates the automatic sizing behavior of the control.                                                                                                    |
| [UserControl.AutoSizeMode](/api/wisej.web/containers/wisej.web.usercontrol.md#autosizemode)                                           | Returns or sets how the control will resize itself.                                                                                                        |
| [ButtonExtensions.AutoSizeMode](/api/wisej.web.markup/extensions/wisej.web.markup.buttonextensions.md#autosizemode-button-mode)       | Sets the AutoSizeMode property of the specified [Button](/api/wisej.web/buttons/button.md).                                                                |
| [GroupBoxExtensions.AutoSizeMode](/api/wisej.web.markup/extensions/wisej.web.markup.groupboxextensions.md#autosizemode-groupbox-mode) | Sets the AutoSizeMode property of the specified [GroupBox](/api/wisej.web/containers/wisej.web.groupbox.md).                                               |
| [FormExtensions.AutoSize](/api/wisej.web.markup/extensions/wisej.web.markup.formextensions.md#autosize-form-autosize-mode)            | Sets the AutoSize property and AutoSizeMode for the specified [Form](/api/wisej.web/containers/form.md) control, enabling or disabling automatic resizing. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.autosizemode.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
