We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to add the scrollbar to the Carousel items?

User can add the ScrollBar to the Carousel Items. It can be achieved by adding the ScrollViewer control inside the ItemTemplate of Carousel control. The following code demonstrates the same.



<!-- Carousel control -->
<syncfusion:Carousel Height="300" x:Name="carousel" ItemsSource="{Binding Collection}">
<!-- Set Height For Carousel Items -->
<Style TargetType="syncfusion:CarouselItem">
<Setter Property="Height" Value="140" />
<!-- For Adding ScrollBar to Carousel Items -->
<Grid >
<!-- Add ScrollBar  -->
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" >
<Border x:Name="border" >
<Grid Width="150" Height="300">
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<TextBox TextWrapping="Wrap" Grid.Row="0"  Background="Green" Foreground="White" 
Text="The Carousel is a circular conveyor used on which objects are displayed and rotated. The Carousel control provides a 3D interface for displaying objects with interactive navigation, Data Binding Path, Items Per Page, Scaling and Skewing."/>
<Image Source="/Images1/dodsworth.png" Grid.Row="1"  />



public class Model
public ObservableCollection<Model> Collection { get; set; }
public ViewModel()
Collection = new ObservableCollection<Model>();
Collection.Add(new Model() );
Collection.Add(new Model() );
Collection.Add(new Model() );
Collection.Add(new Model() );
Collection.Add(new Model() );          





Sample:  CarouselSample


2X faster development

The ultimate WPF UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile