Skip to content

syncfusion/wpf-ui-components-skills / skills/syncfusion-wpf-carousel

syncfusion-wpf-carousel

Verified

Implements the Syncfusion WPF Carousel for displaying items in rotating or custom path interfaces with navigation support. Use when building image carousels, rotating galleries, or custom-path item displays with templates and data binding.

references/navigation.md

View on GitHub
# Navigation Features in WPF Carousel

## Table of Contents
- [Overview](#overview)
- [Keyboard Navigation](#keyboard-navigation)
- [Scroll Bar Navigation](#scroll-bar-navigation)
- [Mouse Wheel Navigation](#mouse-wheel-navigation)
- [Navigation Commands and Methods](#navigation-commands-and-methods)
- [Looping Items in Custom Path](#looping-items-in-custom-path)
- [Navigation Patterns](#navigation-patterns)

## Overview

The Carousel control provides multiple navigation methods to browse through items: keyboard shortcuts, mouse wheel, scroll bars, and programmatic commands. This flexibility ensures users can navigate carousel items in the way most natural to their workflow.

**Available Navigation Methods:**
- **Keyboard**: Arrow keys, Home, End, Page Up/Down
- **Mouse**: Clicking items, mouse wheel scrolling
- **Scroll Bars**: Horizontal and vertical scroll bars
- **Commands**: Built-in commands for programmatic control
- **Methods**: Direct method calls for custom logic

## Keyboard Navigation

Navigate carousel items using keyboard shortcuts. This is the primary navigation method for accessibility and power users.

### Setup for Keyboard Navigation

Define your model and collection as usual; see `getting-started.md` for a full `ViewModel` example used with keyboard navigation. The Carousel binds to a collection and exposes keyboard navigation when focused.

### XAML Configuration

```xml
<syncfusion:Carousel Name="carousel"
                     ItemsSource="{Binding CarouselItem}">
    <syncfusion:Carousel.DataContext>
        <local:ViewModel/>
    </syncfusion:Carousel.DataContext>
    
    <syncfusion:Carousel.ItemTemplate>
        <DataTemplate>
            <Border Height="60"
                    Width="80"
                    BorderBrush="Purple"
                    BorderThickness="3"
                    Background="LightBlue">
                <TextBlock Text="{Binding Header}" 
                           HorizontalAlignment="Center"
                           VerticalAlignment="Center"
                           FontSize="14"
                           FontWeight="Bold"/>
            </Border>
        </DataTemplate>
    </syncfusion:Carousel.ItemTemplate>
</syncfusion:Carousel>
```

### Keyboard Shortcuts

| Key(s) | Action | Description |
|--------|--------|-------------|
| **Up**, **Left** | Previous Item | Navigate to the previous item from currently selected |
| **Down**, **Right** | Next Item | Navigate to the next item from currently selected |
| **Home**, **Ctrl+Up**, **Ctrl+Left** | First Item | Jump to the first item |
| **End**, **Ctrl+Down**, **Ctrl+Right** | Last Item | Jump to the last item |
| **Page Up** | Previous Page | Navigate to previous page (based on ItemsPerPage) |
| **Page Down** | Next Page | Navigate to next page (based on ItemsPerPage) |

### Navigation Examples

**Navigate to Previous Item:**
- Press `Left Arrow` or `Up Arrow`
- Item selection moves backward by one position

**Navigate to Next Item:**
- Press `Right Arrow` or `Down Arrow`
- Item selection moves forward by one position

**Jump to First Item:**
- Press `Home`, `Ctrl+Up`, or `Ctrl+Left`
- Selection jumps to the first carousel item

**Jump to Last Item:**
- Press `End`, `Ctrl+Down`, or `Ctrl+Right`
- Selection jumps to the last carousel item

**Navigate by Page:**
- Press `Page Up`: Move backward by `ItemsPerPage` items
- Press `Page Down`: Move forward by `ItemsPerPage` items

**Example with ItemsPerPage:**
```xml
<syncfusion:Carousel ItemsPerPage="5"
                     VisualMode="CustomPath"
                     ItemsSource="{Binding CarouselItem}">
    <syncfusion:Carousel.Path>
        <Path Data="M0,0 L100,0"/>
    </syncfusion:Carousel.Path>
</syncfusion:Carousel>
```

When `ItemsPerPage="5"`, pressing `Page Down` navigates 5 items forward.

## Scroll Bar Navigation

Enable scroll bars to navigate carousel items using mouse dragging or scroll control clicks. For the core navigation behavior, see [navigation-basics.md](navigation-basics.md). For advanced navigation patterns and gestures, see [navigation-patterns.md](navigation-patterns.md).

### Enable Scroll Bars

By default, scroll bars are collapsed. Enable them using `ScrollViewer` attached properties:

```xml
<syncfusion:Carousel ScrollViewer.VerticalScrollBarVisibility="Visible" 
                     ScrollViewer.HorizontalScrollBarVisibility="Visible"
                     VisualMode="CustomPath"
                     ItemsSource="{Binding CarouselItem}">
    <syncfusion:Carousel.Path>
        <Path Data="M0,0 L100,0" />
    </syncfusion:Carousel.Path>
    
    <syncfusion:Carousel.ItemTemplate>
        <DataTemplate>
            <Border Height="100"
                    Width="100"
                    BorderBrush="Purple"
                    BorderThickness="3"
                    Background="LightBlue">
                <TextBlock Text="{Binding Header}"
                           HorizontalAlignment="Center"
                           VerticalAlignment="Center" />
            </Border>
        </DataTemplate>
    </syncfusion:Carousel.ItemTemplate>
</syncfusion:Carousel>
```

When scroll bars are visible, users can drag the thumb or use the scroll track to move through carousel items.

slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 196kUpdated Claude CodeCodexVerifiedInstall