# SplitContainer

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)
      * [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.

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

```csharp
public class SplitContainer : ContainerControl, ISupportInitialize
```

{% endtab %}

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

```visual-basic
Public Class SplitContainer
    Inherits ContainerControl
    Implements ISupportInitialize
```

{% endtab %}
{% endtabs %}

## Constructors

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

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

## Properties

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

[Image](https://docs.microsoft.com/dotnet/api/system.drawing.image): Returns or sets the background image displayed in the control. (Default: `null`)

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

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the background image displayed in the control. (Default: `null`)

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

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

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

[BorderStyle](/api/wisej.web/enumerations/wisej.web.borderstyle.md): Returns or sets the style of border for the [SplitContainer](/api/wisej.web/containers/splitcontainer.md). (Default: `Solid`)

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

[Size](https://docs.microsoft.com/dotnet/api/system.drawing.size): Returns the default size of the [SplitContainer](/api/wisej.web/containers/splitcontainer.md).

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

[FixedPanel](/api/wisej.web/containers/splitcontainer/wisej.web.fixedpanel.md): Returns or sets which [SplitContainer](/api/wisej.web/containers/splitcontainer.md) panel remains the same size when the container is resized. (Default: `None`)

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the splitter is fixed or movable. (Default: `False`)

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

[Orientation](/api/wisej.web/enumerations/wisej.web.orientation.md): Returns or sets a value indicating the horizontal or vertical orientation of the [SplitContainer](/api/wisej.web/containers/splitcontainer.md) panels. (Default: `Vertical`)

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

[SplitterPanel](/api/wisej.web/containers/splitcontainer/wisej.web.splitterpanel.md): Returns the left or top panel of the [SplitContainer](/api/wisej.web/containers/splitcontainer.md), depending on [Orientation](#orientation).

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets a value determining whether [Panel1](#panel1) is collapsed or expanded. (Default: `False`)

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

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns or sets the minimum distance in pixels of the splitter from the left or top edge of [Panel1](#panel1). (Default: `25`)

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception)\
  The specified value is incompatible with the orientation.

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

[SplitterPanel](/api/wisej.web/containers/splitcontainer/wisej.web.splitterpanel.md): Returns the right or bottom panel of the [SplitContainer](/api/wisej.web/containers/splitcontainer.md), depending on [Orientation](#orientation).

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets a value determining whether [Panel2](#panel2) is collapsed or expanded. (Default: `False`)

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

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns or sets the minimum distance in pixels of the splitter from the right or bottom edge of [Panel2](#panel2). (Default: `25`)

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception)\
  The specified value is incompatible with the orientation.

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

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns or sets the location of the splitter, in pixels, from the left or top edge of the [SplitContainer](/api/wisej.web/containers/splitcontainer.md). (Default: `50`)

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception)\
  The value is less than zero.
* [InvalidOperationException](https://docs.microsoft.com/dotnet/api/system.invalidoperationexception)\
  The value is incompatible with the orientation.

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

[Rectangle](https://docs.microsoft.com/dotnet/api/system.drawing.rectangle): Returns the size and location of the splitter relative to the [SplitContainer](/api/wisej.web/containers/splitcontainer.md).

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

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns or sets the width of the splitter in pixels.

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception)\
  The value is less than one or is incompatible with the orientation.

## Methods

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

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

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

| Parameter | Type                                                                           | Description                                                                                                    |
| --------- | ------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |
| **e**     | [LayoutEventArgs](/api/wisej.web/general/control/wisej.web.layouteventargs.md) | A [LayoutEventArgs](/api/wisej.web/general/control/wisej.web.layouteventargs.md) that contains the event data. |

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

Fires the [OrientationChanged](#orientationchanged) 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) OnRightToLeftChanged(e)

Fires the [RightToLeftChanged](/api/wisej.web/general/control.md#righttoleftchanged) 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) OnSplitterMoved(e)

Fires the [SplitterMoved](#splittermoved) event.

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

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

Fires the [SplitterMoving](#splittermoving) event.

| Parameter | Type                                                                                                     | Description                                                                                                                  |
| --------- | -------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| **e**     | [SplitterCancelEventArgs](/api/wisej.web/containers/splitcontainer/wisej.web.splittercanceleventargs.md) | A [SplitterEventArgs](/api/wisej.web/containers/splitcontainer/wisej.web.splittereventargs.md) 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/hsR4ok3152WyAf8J2C1u) ResetSplitterWidth()

Resets the size of the splitter to the value set in the theme.

### ![](/files/lzopMboA31bVq8UIcbT3) SetBoundsCore(x, y, width, height, specified)

| Parameter     | Type                                                                        | Description                                                                                              |
| ------------- | --------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| **x**         | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                 | The new [Left](/api/wisej.web/general/control.md#left) property value of the control.                    |
| **y**         | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                 | The new [Top](/api/wisej.web/general/control.md#top) property value of the control.                      |
| **width**     | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                 | The new [Width](/api/wisej.web/general/control.md#width) property value of the control.                  |
| **height**    | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                 | The new [Height](/api/wisej.web/general/control.md#height) property value of the control.                |
| **specified** | [BoundsSpecified](/api/wisej.web/enumerations/wisej.web.boundsspecified.md) | A combination of the [BoundsSpecified](/api/wisej.web/enumerations/wisej.web.boundsspecified.md) values. |

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

## Events

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

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

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

[SplitterEventHandler](/api/wisej.web/containers/splitcontainer/wisej.web.splittereventhandler.md) Fired when the splitter control is moved.

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

[SplitterCancelEventHandler](/api/wisej.web/containers/splitcontainer/wisej.web.splittercanceleventhandler.md) Fired when the splitter control is in the process of moving.

## 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/splitcontainer.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.
