# FTRSidebar

## Overview

Vertical icon sidebar with scroll, hover/selection states, keyboard navigation, and theme colors.

**Namespace:** `FTRControls`  
**Inherits:** `FTRControls.BaseClasses.FTRBaseControl`  
**Toolbox:** FTR Controls  
**Default event:** `SelectedIndexChanged`

## Related type: FTRSidebarItem

| Property | Description |
|----------|-------------|
| `Title` | Item label |
| `Icon` | Item image |

## Properties

| Property | Type | Category | Premium | Description |
|----------|------|----------|---------|-------------|
| `Items` | List\<FTRSidebarItem\> | — | No | Navigation items |
| `SelectedIndex` | int | — | No | Active index |
| `SelectedItem` | FTRSidebarItem | — | No | Active item |
| `ItemHeight` | int | — | **Yes** | Row height (default 50) |
| `ScrollSensitivity` | int | — | **Yes** | Wheel scroll step (default 3) |
| `SidebarColor`, `SelectedColor`, `HoverColor`, `TextColor` | Color | — | No | Custom colors |

## Events

| Event | When raised |
|-------|-------------|
| `SelectedIndexChanged` | Selection changes |

## Methods

| Method | Description |
|--------|-------------|
| `ApplyTheme()` | Sidebar palette from `FTRThemeColors` |
| `RefreshIconCache()` | Rebuild icon cache |

## Examples

```csharp
var sidebar = new FTRSidebar { Width = 220, Dock = DockStyle.Left };
sidebar.Items.Add(new FTRSidebarItem { Title = "Home", Icon = homeIcon });
sidebar.Items.Add(new FTRSidebarItem { Title = "Settings", Icon = settingsIcon });
sidebar.SelectedIndexChanged += (_, _) => ShowPage(sidebar.SelectedIndex);
```

## Premium Features

`ItemHeight` (≠ 50) and `ScrollSensitivity` (≠ 3) require license.

## See also

- [FTRDashboard.md](FTRDashboard.md)
- [ThemeManager.md](ThemeManager.md)
