Skip to main content
Version: 11.0.x


The carousel has an items collection, and displays each item as a page, in sequence, so that it fills the control.

You can use the carousel control to create a slide show.

Useful Properties

You will probably use these properties most often:

ItemsSourceThe bound collection that is used as the data source for the control.
ItemsControl.ItemTemplateThe item template, contains a DataTemplate which will be applied to individual items and can be used to change how items look.
ItemsControl.ItemPanelThe container panel to place items in. See this page to customise the ItemsPanel.
ItemsControl.StylesThe style that is applied to any child element of the ItemControl.


This example has three images in the items collection, with buttons to move the display forwards and back. The buttons have click event handlers in the C# code-behind.

<Carousel Name="slides" >
<Carousel.PageTransition >
<PageSlide Duration="0:00:01.500" Orientation="Horizontal" />
<Image Source="avares://AvaloniaControls/Assets/pipes.jpg" />
<Image Source="avares://AvaloniaControls/Assets/controls.jpg" />
<Image Source="avares://AvaloniaControls/Assets/vault.jpg" />
<Panel Margin="20">
<Button Background="White" Click="Previous">&lt;</Button>
<Button Background="White" Click="Next"
using Avalonia.Controls;
using Avalonia.Interactivity;

namespace AvaloniaControls.Views
public partial class MainWindow : Window
public MainWindow()

public void Next(object source, RoutedEventArgs args)

public void Previous(object source, RoutedEventArgs args)

More Information

For the complete API documentation about this control, see here.

View the source code on GitHub Carousel.cs