# ContainerControl

Namespace: **Wisej.Web**

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

* [Control](/api/wisej.web/general/control.md)
  * [ScrollableControl](/api/wisej.web/containers/scrollablecontrol.md)
    * [ContainerControl](/api/wisej.web/containers/containercontrol.md)

Provides focus-management functionality for controls that can function as a container for other controls.

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

```csharp
public class ContainerControl : ScrollableControl, IContainerControl, IContainerControl
```

{% endtab %}

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

```visual-basic
Public Class ContainerControl
    Inherits ScrollableControl
    Implements IContainerControl, IContainerControl
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/hsR4ok3152WyAf8J2C1u) ContainerControl()

Initializes a new instance of the [ContainerControl](/api/wisej.web/containers/containercontrol.md) class.

## Properties

### ![](/files/hsR4ok3152WyAf8J2C1u) Accelerators

[Keys\[\]](/api/wisej.web/enumerations/wisej.web.keys.md): Returns or sets a collection of keys that fire the Accelerator event when the user presses the accelerator key while the focus is on any child control. (Default: `null`)

### ![](/files/hsR4ok3152WyAf8J2C1u) ActiveControl

[Control](/api/wisej.web/general/control.md): Returns or sets the active control on the container control.

**Throws:**

* [ArgumentException](https://docs.microsoft.com/dotnet/api/system.argumentexception)\
  The [Control](/api/wisej.web/general/control.md) assigned could not be activated.

### ![](/files/lzopMboA31bVq8UIcbT3) AutoScaleFactor

[SizeF](https://docs.microsoft.com/dotnet/api/system.drawing.sizef): Returns the scaling factor between the current and design-time automatic scaling dimensions.

### ![](/files/hsR4ok3152WyAf8J2C1u) BindingContext

[BindingContext](/api/wisej.web/data-binding/wisej.web.bindingcontext.md): Returns or sets the BindingContext for the control.

### ![](/files/hsR4ok3152WyAf8J2C1u) KeyPreview

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the container will receive key events before the event is passed to the control that has focus. (Default: `False`)

### ![](/files/hsR4ok3152WyAf8J2C1u) ParentForm

[Form](/api/wisej.web/containers/form.md): Returns the [Form](/api/wisej.web/containers/form.md) that the container control is assigned to.

### ![](/files/hsR4ok3152WyAf8J2C1u) ParentPage

[Page](/api/wisej.web/containers/wisej.web.page.md): Returns the [Page](/api/wisej.web/containers/wisej.web.page.md) that the container control is assigned to.

### ![](/files/hsR4ok3152WyAf8J2C1u) RightToLeftLayout

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Enables or disables right-to-left layout when the value of [RightToLeft](/api/wisej.web/general/control.md#righttoleft) is [Yes](/api/wisej.web/enumerations/wisej.web.righttoleft.md#fields) (Default: `False`)

## Methods

### ![](/files/lzopMboA31bVq8UIcbT3) Dispose(disposing)

Disposes the page and related resources.

| Parameter     | Type                                                            | Description                                                                 |
| ------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------- |
| **disposing** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) | true when this method is called by the application rather than a finalizer. |

### ![](/files/hsR4ok3152WyAf8J2C1u) FocusActiveControl()

Sets the focus to the active control.

### ![](/files/lzopMboA31bVq8UIcbT3) OnAccelerator(e)

Fires the [Accelerator](#accelerator) event.

| Parameter | Type                                                                                                 | Description                                                                                                                          |
| --------- | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| **e**     | [AcceleratorEventArgs](/api/wisej.web/containers/containercontrol/wisej.web.acceleratoreventargs.md) | A [AcceleratorEventArgs](/api/wisej.web/containers/containercontrol/wisej.web.acceleratoreventargs.md) that contains the event data. |

### ![](/files/lzopMboA31bVq8UIcbT3) OnAutoValidateChanged(e)

Fires the [AutoValidateChanged](#autovalidatechanged) event.

| Parameter | Type                                                                | Description                                                                                         |
| --------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| **e**     | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | A [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) that contains the event data. |

### ![](/files/lzopMboA31bVq8UIcbT3) OnCreateControl()

Raised when the control is created.

### ![](/files/lzopMboA31bVq8UIcbT3) OnFontChanged(e)

Fires the [FontChanged](/api/wisej.web/general/control.md#fontchanged) event.

| Parameter | Type                                                                | Description                                                                                         |
| --------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| **e**     | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | A [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) that contains the event data. |

### ![](/files/lzopMboA31bVq8UIcbT3) OnParentFontChanged(e)

Fires the [FontChanged](/api/wisej.web/general/control.md#fontchanged) event when the [Font](/api/wisej.web/general/control.md#font) property value of the control's container changes.

| Parameter | Type                                                                | Description                                                                                          |
| --------- | ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| **e**     | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | An [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) that contains the event data. |

### ![](/files/lzopMboA31bVq8UIcbT3) OnRightToLeftLayoutChanged(e)

Fires the [RightToLeftLayoutChanged](#righttoleftlayoutchanged) event.

| Parameter | Type                                                                | Description                                                                                         |
| --------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| **e**     | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | A [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) that contains the event data. |

### ![](/files/lzopMboA31bVq8UIcbT3) OnWebEvent(e)

Processes the event from the client.

| Parameter | Type                                                        | Description      |
| --------- | ----------------------------------------------------------- | ---------------- |
| **e**     | [WisejEventArgs](/api/wisej.core/general/wisejeventargs.md) | Event arguments. |

### ![](/files/lzopMboA31bVq8UIcbT3) OnWebRender(config)

Renders the client component.

| Parameter  | Type                                                          | Description                   |
| ---------- | ------------------------------------------------------------- | ----------------------------- |
| **config** | [Object](https://docs.microsoft.com/dotnet/api/system.object) | Dynamic configuration object. |

### ![](/files/lzopMboA31bVq8UIcbT3) ProcessKeyPreview(e)

Processes a key event before the KeyDown and KeyUp events.

| Parameter | Type                                                        | Description                                                                                 |
| --------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| **e**     | [WisejEventArgs](/api/wisej.core/general/wisejeventargs.md) | A [WisejEventArgs](/api/wisej.core/general/wisejeventargs.md) that contains the event data. |

**Returns:** [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean). true if the key event was processed by the control; otherwise false.

### ![](/files/lzopMboA31bVq8UIcbT3) Select(directed, forward)

Activates a child control. Optionally specifies the direction in the tab order to select the control from.

| Parameter    | Type                                                            | Description                                                                     |
| ------------ | --------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| **directed** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) | true to specify the direction of the control to select; otherwise, false.       |
| **forward**  | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) | true to move forward in the tab order; false to move backward in the tab order. |

**Returns:** [Control](/api/wisej.web/general/control.md).

### ![](/files/hsR4ok3152WyAf8J2C1u) Validate()

Validates the last unvalidated control and its ancestors up through, but not including the current control.

**Returns:** [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean).

### ![](/files/hsR4ok3152WyAf8J2C1u) Validate(checkAutoValidate)

Validates the last unvalidated control and its ancestors up through, but not including the current control.

| Parameter             | Type                                                            | Description                                                                                                                                                                 |
| --------------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **checkAutoValidate** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) | If true, the value of the [AutoValidate](#autovalidate) property is used to determine if validation should be performed; if false, validation is unconditionally performed. |

**Returns:** [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean).

## Events

### ![](/files/hsR4ok3152WyAf8J2C1u) Accelerator

[AcceleratorEventHandler](/api/wisej.web/containers/containercontrol/wisej.web.acceleratoreventhandler.md) Fired when one of the [Accelerators](#accelerators) key is pressed.

### ![](/files/hsR4ok3152WyAf8J2C1u) RightToLeftLayoutChanged

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the value of the [RightToLeftLayout](#righttoleftlayout) property changes.

## Inherited By

| Name                                                                                      | Description                                                                                                                                                           |
| ----------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [FileDialogUI](/api/wisej.web/common-dialogs/wisej.web.filedialogui.md)                   | UI implementation for the FileDialog class.                                                                                                                           |
| [FolderBrowserDialogUI](/api/wisej.web/common-dialogs/wisej.web.folderbrowserdialogui.md) | UI implementation for the FolderDialog class.                                                                                                                         |
| [Form](/api/wisej.web/containers/form.md)                                                 | Represents a window or dialog box that makes up an application's user interface.                                                                                      |
| [Page](/api/wisej.web/containers/wisej.web.page.md)                                       | Represents a web page that fills the browser and acts as the main container for the application. An application can have only one active main page at any given time. |
| [SplitContainer](/api/wisej.web/containers/splitcontainer.md)                             | Represents a control consisting of a movable bar that divides a container's display area into two resizable panels.                                                   |
| [UserControl](/api/wisej.web/containers/wisej.web.usercontrol.md)                         | Provides an empty control that can be used to create other controls.                                                                                                  |
| [DataRepeater](/api/wisej.web/containers/datarepeater.md)                                 | Displays data in a customizable list format.                                                                                                                          |
| [Desktop](/api/wisej.web/containers/desktop.md)                                           | Represents a desktop container that can host floating windows.                                                                                                        |
| [UserPopup](/api/wisej.web/containers/wisej.web.userpopup.md)                             | Provides an popup container that can be attached to other controls.                                                                                                   |

## Implements

| Name                                                                              | Description                                                                                                           |
| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| [IUserData](/api/wisej.web/interfaces/wisej.web.iuserdata.md)                     | Provides access to the `UserData` and `Tag` properties associated to the component implementing this interface.       |
| [IBindableComponent](/api/wisej.web/data-binding/wisej.web.ibindablecomponent.md) | Bindable components implement this interface.                                                                         |
| [IContainerControl](/api/wisej.web/interfaces/wisej.web.icontainercontrol.md)     | Provides the functionality for a control to act as a parent for other controls.                                       |
| [IDropTarget](/api/wisej.web/interfaces/wisej.web.idroptarget.md)                 | Controls that support drag & drop operations implement this interface.                                                |
| [IWisejComponent](/api/wisej.core/interfaces/wisej.core.iwisejcomponent.md)       | All wisej components implement this interface.                                                                        |
| [IWisejControl](/api/wisej.core/interfaces/wisej.core.iwisejcontrol.md)           | All wisej controls derived from the [Control](/api/wisej.web/general/control.md) class must implement this interface. |
| [IWisejSerializable](/api/wisej.core/interfaces/wisej.core.iwisejserializable.md) | Allows an object to serialize itself.                                                                                 |


---

# 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/containers/containercontrol.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.
