# SlideBar

Namespace: **Wisej.Web**

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

* [Control](https://docs.wisej.com/api/v2.2/wisej.web/general/control)
  * [SlideBar](https://docs.wisej.com/api/v2.2/wisej.web/containers/wisej.web.slidebar)

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

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

Initializes a new instance of the [SlideBar](https://docs.wisej.com/api/v2.2/wisej.web/containers/wisej.web.slidebar) class.

## Properties

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

[BorderStyle](https://docs.wisej.com/api/v2.2/wisej.web/enumerations/wisej.web.borderstyle): Returns or sets the type of border that is drawn around the [SlideBar](https://docs.wisej.com/api/v2.2/wisej.web/containers/wisej.web.slidebar) control.

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

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

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

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

[HScrollProperties](https://docs.wisej.com/api/v2.2/wisej.web/content/scrollbar/wisej.web.hscrollproperties): Returns the properties associated with the horizontal scroll position.

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

[LayoutEngine](https://docs.wisej.com/api/v2.2/wisej.web/containers/wisej.web.slidebar): Returns the control's layout engine.

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

[Orientation](https://docs.wisej.com/api/v2.2/wisej.web/enumerations/wisej.web.orientation): Returns or sets the [Orientation](https://docs.wisej.com/api/v2.2/wisej.web/enumerations/wisej.web.orientation) of the [SlideBar](https://docs.wisej.com/api/v2.2/wisej.web/containers/wisej.web.slidebar) control.

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

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

**Throws:**

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

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

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

**Throws:**

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

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

[VScrollProperties](https://docs.wisej.com/api/v2.2/wisej.web/content/scrollbar/wisej.web.vscrollproperties): Returns the properties associated with the vertical scroll position.

## Methods

### ![](https://1958722042-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-3433078682%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)ScrollBy(offset, duration)

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

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

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

Scrolls the specified child *control* into view.

| Parameter   | Type                                                                 | Description                            |
| ----------- | -------------------------------------------------------------------- | -------------------------------------- |
| **control** | [Control](https://docs.wisej.com/api/v2.2/wisej.web/general/control) | The child control to scroll into view. |

### ![](https://1958722042-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-3433078682%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)ScrollControlIntoView(control, alignX)

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

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

### ![](https://1958722042-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-3433078682%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)ScrollControlIntoView(control, alignY)

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

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

### ![](https://1958722042-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-3433078682%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)ScrollTo(position, duration)

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

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

## Events

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

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

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

[ScrollEventHandler](https://docs.wisej.com/api/v2.2/wisej.web/content/scrollbar/wisej.web.scrolleventhandler) Fired when the [SlideBar](https://docs.wisej.com/api/v2.2/wisej.web/containers/wisej.web.slidebar) 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.

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

[EventHandler](https://docs.microsoft.com/en-us/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.

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

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

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

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

## Implements

| Name                                                                                                      | Description                                                                                                                                   |
| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| [IBindableComponent](https://docs.wisej.com/api/v2.2/wisej.web/data-binding/wisej.web.ibindablecomponent) | Bindable components implement this interface.                                                                                                 |
| [IWisejComponent](https://docs.wisej.com/api/v2.2/wisej.core/interfaces/wisej.core.iwisejcomponent)       | All wisej components implement this interface.                                                                                                |
| [IWisejControl](https://docs.wisej.com/api/v2.2/wisej.core/interfaces/wisej.core.iwisejcontrol)           | All wisej controls derived from the [Control](https://docs.wisej.com/api/v2.2/wisej.web/general/control) class must implement this interface. |
| [IWisejSerializable](https://docs.wisej.com/api/v2.2/wisej.core/interfaces/wisej.core.iwisejserializable) | 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/v2.2/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.
