# SplitButton

Namespace: **Wisej.Web**

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

* [Control](/api/wisej.web/general/control.md)
  * [ButtonBase](/api/wisej.web/buttons/wisej.web.buttonbase.md)
    * [Button](/api/wisej.web/buttons/button.md)
      * [SplitButton](/api/wisej.web/buttons/wisej.web.splitbutton.md)

Represents a split button control.

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

```csharp
public class SplitButton : Button
```

{% endtab %}

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

```visual-basic
Public Class SplitButton
    Inherits Button
```

{% endtab %}
{% endtabs %}

## Constructors

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

Initializes a new instance of the [SplitButton](/api/wisej.web/buttons/wisej.web.splitbutton.md) class.

### ![](/files/hsR4ok3152WyAf8J2C1u) SplitButton(text, onClick)

Initializes a new instance of the [SplitButton](/api/wisej.web/buttons/wisej.web.splitbutton.md) class with specific initial settings.

| Name        | Type                                                                                | Description                                                        |
| ----------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
| **text**    | [String](https://docs.microsoft.com/dotnet/api/system.string)                       | Initial text.                                                      |
| **onClick** | [Action\<Object, EventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) | Optional [Click](/api/wisej.web/general/control.md#click) handler. |

### ![](/files/hsR4ok3152WyAf8J2C1u) SplitButton(text, location, size, onClick)

Initializes a new instance of the [SplitButton](/api/wisej.web/buttons/wisej.web.splitbutton.md) class with specific initial settings.

| Name         | Type                                                                                | Description             |
| ------------ | ----------------------------------------------------------------------------------- | ----------------------- |
| **text**     | [String](https://docs.microsoft.com/dotnet/api/system.string)                       | Initial text.           |
| **location** | [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point)                 | Initial location.       |
| **size**     | [Size](https://docs.microsoft.com/dotnet/api/system.drawing.size)                   | Initial size.           |
| **onClick**  | [Action\<Object, EventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) | Optional click handler. |

### ![](/files/hsR4ok3152WyAf8J2C1u) SplitButton(text, ImageSource, location, size, onClick)

Initializes a new instance of the [SplitButton](/api/wisej.web/buttons/wisej.web.splitbutton.md) class with specific initial settings.

| Name            | Type                                                                                | Description             |
| --------------- | ----------------------------------------------------------------------------------- | ----------------------- |
| **text**        | [String](https://docs.microsoft.com/dotnet/api/system.string)                       | Initial text.           |
| **ImageSource** | [String](https://docs.microsoft.com/dotnet/api/system.string)                       | Image source.           |
| **location**    | [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point)                 | Initial location.       |
| **size**        | [Size](https://docs.microsoft.com/dotnet/api/system.drawing.size)                   | Initial size.           |
| **onClick**     | [Action\<Object, EventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) | Optional click handler. |

## Properties

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

[Orientation](/api/wisej.web/enumerations/wisej.web.orientation.md): Returns or sets a value indicating the layout of the [SplitButton](/api/wisej.web/buttons/wisej.web.splitbutton.md). When the value is set to [Vertical](/api/wisej.web/enumerations/wisej.web.orientation.md#fields) the down arrow is places below the text, otherwise it's to the right of the text. (Default: `Horizontal`)

## Methods

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

Renders the client component.

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

## 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.                                                                         |
| [IButtonControl](/api/wisej.web/interfaces/wisej.web.ibuttoncontrol.md)           | Allows a control to act like a button on a [Form](/api/wisej.web/containers/form.md).                                 |
| [ICommandSource](/api/wisej.web/interfaces/wisej.web.icommandsource.md)           | Defines an object that can invoke a [Command](/api/wisej.web/interfaces/wisej.web.icommandsource.md#command).         |
| [IDropTarget](/api/wisej.web/interfaces/wisej.web.idroptarget.md)                 | Controls that support drag & drop operations implement this interface.                                                |
| [IImage](/api/wisej.web/interfaces/wisej.web.iimage.md)                           | Provides access to common image properties across the controls that 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/buttons/wisej.web.splitbutton.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.
