# SplitButton

Namespace: **Wisej.Web**

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

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

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

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) SplitButton()

Initializes a new instance of the [SplitButton](https://docs.wisej.com/api/wisej.web/buttons/wisej.web.splitbutton) class.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) SplitButton(text, onClick)

Initializes a new instance of the [SplitButton](https://docs.wisej.com/api/wisej.web/buttons/wisej.web.splitbutton) 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](https://docs.wisej.com/api/general/control#click) handler. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) SplitButton(text, location, size, onClick)

Initializes a new instance of the [SplitButton](https://docs.wisej.com/api/wisej.web/buttons/wisej.web.splitbutton) 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. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) SplitButton(text, ImageSource, location, size, onClick)

Initializes a new instance of the [SplitButton](https://docs.wisej.com/api/wisej.web/buttons/wisej.web.splitbutton) 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

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Orientation

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

## Methods

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) 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](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.iuserdata)                     | Provides access to the `UserData` and `Tag` properties associated to the component implementing this interface.                          |
| [IBindableComponent](https://docs.wisej.com/api/wisej.web/data-binding/wisej.web.ibindablecomponent) | Bindable components implement this interface.                                                                                            |
| [IButtonControl](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.ibuttoncontrol)           | Allows a control to act like a button on a [Form](https://docs.wisej.com/api/wisej.web/containers/form).                                 |
| [ICommandSource](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.icommandsource)           | Defines an object that can invoke a [Command](https://docs.wisej.com/api/interfaces/wisej.web.icommandsource#command).                   |
| [IDropTarget](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.idroptarget)                 | Controls that support drag & drop operations implement this interface.                                                                   |
| [IImage](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.iimage)                           | Provides access to common image properties across the controls that implement this interface.                                            |
| [IWisejComponent](https://docs.wisej.com/api/wisej.core/interfaces/wisej.core.iwisejcomponent)       | All wisej components implement this interface.                                                                                           |
| [IWisejControl](https://docs.wisej.com/api/wisej.core/interfaces/wisej.core.iwisejcontrol)           | All wisej controls derived from the [Control](https://docs.wisej.com/api/wisej.web/general/control) class must implement this interface. |
| [IWisejSerializable](https://docs.wisej.com/api/wisej.core/interfaces/wisej.core.iwisejserializable) | Allows an object to serialize itself.                                                                                                    |
