# SlideBar

Namespace: **Wisej.Web**

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

* [Control](/api/wisej.web/general/control.md)
  * [SlideBar](/api/wisej.web/containers/wisej.web.slidebar.md)

Displays child controls vertically or horizontally in a scrollable container.

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

```csharp
public class SlideBar : Control
```

{% endtab %}

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

```visual-basic
Public Class SlideBar
    Inherits Control
```

{% endtab %}
{% endtabs %}

## Constructors

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

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

### ![](/files/hsR4ok3152WyAf8J2C1u) SlideBar(controls, orientation)

Initializes a new instance of the [SlideBar](/api/wisej.web/containers/wisej.web.slidebar.md) class with the specified settings.

| Name            | Type                                                                | Description                                                                                |
| --------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| **controls**    | [Control\[\]](/api/wisej.web/general/control.md)                    | An array of [Control](/api/wisej.web/general/control.md) objects to be added to the panel. |
| **orientation** | [Orientation](/api/wisej.web/enumerations/wisej.web.orientation.md) | Initial [Orientation](#orientation) value.                                                 |

### ![](/files/hsR4ok3152WyAf8J2C1u) SlideBar(location, size, controls, orientation)

Initializes a new instance of the [SlideBar](/api/wisej.web/containers/wisej.web.slidebar.md) class with the specified settings.

| Name            | Type                                                                | Description                                                                                |
| --------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| **location**    | [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) | The location of the panel on its parent control.                                           |
| **size**        | [Size](https://docs.microsoft.com/dotnet/api/system.drawing.size)   | The size of the panel.                                                                     |
| **controls**    | [Control\[\]](/api/wisej.web/general/control.md)                    | An array of [Control](/api/wisej.web/general/control.md) objects to be added to the panel. |
| **orientation** | [Orientation](/api/wisej.web/enumerations/wisej.web.orientation.md) | Initial [Orientation](#orientation) value.                                                 |

## Properties

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

[BorderStyle](/api/wisej.web/enumerations/wisej.web.borderstyle.md): Returns or sets the type of border that is drawn around the [SlideBar](/api/wisej.web/containers/wisej.web.slidebar.md) control. (Default: `None`)

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

[Color](https://docs.microsoft.com/dotnet/api/system.drawing.color): Returns or sets the background [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color) of the scroll buttons.

The default background color is set in the theme color as "slidebarButtons".

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

[HScrollProperties](/api/wisej.web/content/scrollbar/wisej.web.hscrollproperties.md): Returns the properties associated with the horizontal scroll position.

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns whether the horizontal scroll buttons are visible.

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

[LayoutEngine](https://github.com/iceteagroup/wisej-docs-api/blob/v4.0/wisej.web.layout/containers/layoutengine/layoutengine/README.md): Returns the control's layout engine.

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

[Orientation](/api/wisej.web/enumerations/wisej.web.orientation.md): Returns or sets the [Orientation](/api/wisej.web/enumerations/wisej.web.orientation.md) of the [SlideBar](/api/wisej.web/containers/wisej.web.slidebar.md) control. (Default: `Horizontal`)

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

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns or sets the number of pixels to scroll when the scroll buttons are pressed. (Default: `15`)

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception) The value is less than 1 or greater than 32000.

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

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns or sets the spacing between the child controls. (Default: `0`)

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception) The value is less than 0 or greater than 32000.

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

[VScrollProperties](/api/wisej.web/content/scrollbar/wisej.web.vscrollproperties.md): Returns the properties associated with the vertical scroll position.

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns whether the vertical scroll buttons are visible.

## Methods

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

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

| Parameter | Type                                                                             | Description                                                                                                      |
| --------- | -------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| **e**     | [ControlEventArgs](/api/wisej.web/general/control/wisej.web.controleventargs.md) | A [ControlEventArgs](/api/wisej.web/general/control/wisej.web.controleventargs.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) OnScroll(e)

Fires the [Scroll](#scroll) event.

| Parameter | Type                                                                             | Description                                                                                                      |
| --------- | -------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| **e**     | [ScrollEventArgs](/api/wisej.web/content/scrollbar/wisej.web.scrolleventargs.md) | A [ScrollEventArgs](/api/wisej.web/content/scrollbar/wisej.web.scrolleventargs.md) that contains the event data. |

This event fires only if there is an handler attached to it. A simple overload of the On\[Event] method in a derived class will not be invoked unless there is at least one handler attached to the event.

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

Fires the [ScrollAnimationEnd](#scrollanimationend) 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. |

This event fires only if there is an handler attached to it. A simple overload of the On\[Event] method in a derived class will not be invoked unless there is at least one handler attached to the event.

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

Fires the [ScrollStepChanged](#scrollstepchanged) 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) OnSpacingChanged(e)

Fires the [SpacingChanged](#spacingchanged) 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) OnWebUpdate(state)

Updates the client component using the state information.

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

### ![](/files/hsR4ok3152WyAf8J2C1u) ScrollBy(offset, duration)

Scrolls the content by the specified *offset* in pixels.

| Parameter    | Type                                                        | Description                                         |
| ------------ | ----------------------------------------------------------- | --------------------------------------------------- |
| **offset**   | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | Number of pixels to scroll by.                      |
| **duration** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The time in milliseconds the scroll to should take. |

### ![](/files/hsR4ok3152WyAf8J2C1u) ScrollControlIntoView(control)

Scrolls the specified child *control* into view.

| Parameter   | Type                                         | Description                            |
| ----------- | -------------------------------------------- | -------------------------------------- |
| **control** | [Control](/api/wisej.web/general/control.md) | The child control to scroll into view. |

### ![](/files/hsR4ok3152WyAf8J2C1u) ScrollControlIntoView(control, alignX)

Scrolls the specified child *control* into view. using the specified *alignX* preference.

| Parameter   | Type                                                                                | Description                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ----------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **control** | [Control](/api/wisej.web/general/control.md)                                        | The child control to scroll into view.                                                                                                                                                                                                                                                                                                                                                                                              |
| **alignX**  | [HorizontalAlignment](/api/wisej.web/enumerations/wisej.web.horizontalalignment.md) | Indicates the [HorizontalAlignment](/api/wisej.web/enumerations/wisej.web.horizontalalignment.md) preference. The final location of the control depends on the scrollable range and the available space. Note that [Center](/api/wisej.web/enumerations/wisej.web.horizontalalignment.md#fields) will not scroll the control to the center, but will instead scroll it into the closest visible location with the minimum movement. |

### ![](/files/hsR4ok3152WyAf8J2C1u) ScrollControlIntoView(control, alignY)

Scrolls the specified child *control* into view. using the specified *alignY* preference.

| Parameter   | Type                                                                            | Description                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ----------- | ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **control** | [Control](/api/wisej.web/general/control.md)                                    | The child control to scroll into view.                                                                                                                                                                                                                                                                                                                                                                                        |
| **alignY**  | [VerticalAlignment](/api/wisej.web/enumerations/wisej.web.verticalalignment.md) | Indicates the [VerticalAlignment](/api/wisej.web/enumerations/wisej.web.verticalalignment.md) preference. The final location of the control depends on the scrollable range and the available space. Note that [Middle](/api/wisej.web/enumerations/wisej.web.verticalalignment.md#fields) will not scroll the control to the middle, but will instead scroll it into the closest visible location with the minimum movement. |

### ![](/files/hsR4ok3152WyAf8J2C1u) ScrollTo(position, duration)

Scrolls the content to the specified *position* in pixels.

| Parameter    | Type                                                        | Description                                         |
| ------------ | ----------------------------------------------------------- | --------------------------------------------------- |
| **position** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The position in pixels to scroll to.                |
| **duration** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The time in milliseconds the scroll to should take. |

## Events

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

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

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

[ScrollEventHandler](/api/wisej.web/content/scrollbar/wisej.web.scrolleventhandler.md) Fired when the [SlideBar](/api/wisej.web/containers/wisej.web.slidebar.md) widget scrolls its content.

This event fires only if there is an handler attached to it. A simple overload of the On\[Event] method in a derived class will not be invoked unless there is at least one handler attached to the event.

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

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the control has completed the scrolling animation.

This event fires only if there is an handler attached to it. A simple overload of the On\[Event] method in a derived class will not be invoked unless there is at least one handler attached to the event.

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

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

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

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

## 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.                                                                         |
| [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/wisej.web.slidebar.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.
