Articles in this section
Category / Section

How to load images in the Carousel?

1 min read

The Carousel control is a circular conveyor where objects are displayed and rotated. The Carousel control provides a 3-D interface for displaying objects with interactive navigation. You can add images through ImageListCollection, that is, only when the ImageSlides property is set to true.

The following code example demonstrates the same.


private void buttonAdv1_Click(object sender, EventArgs e)
    for (int i = 1; i <= 5; i++)
        CarouselImage carouselImage = new Syncfusion.Windows.Forms.Tools.CarouselImage();
        // Sets the carousel image.
        carouselImage.ItemImage = Image.FromFile("..\\..\\Images\\" + i + ".jpg");
        //Adds the carousel images to ImageListCollection.
    // Displays the images in the Carousel.
    this.carousel1.ImageSlides = true;


Private Sub buttonAdv1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles buttonAdv1.Click
    For i As Integer = 1 To 5
        Dim carouselImage As CarouselImage = New Syncfusion.Windows.Forms.Tools.CarouselImage()
        'Sets the carousel image.
        carouselImage.ItemImage = Image.FromFile("..\..\Images\" & i & ".jpg")
        'Adds the carousel images to ImageListCollection.
    Next i
    'Displays the images in the Carousel.
    Me.carousel1.ImageSlides = True
End Sub



The items of the ImageListCollection in the Carousel should contain the Carousel image.



Images loaded in Carousel

Figure 1: The Carousel images loaded in the Carousel


Added new images in Carousel

Figure 2:  The Carousel images added in the Carousel


Sample Links:



Did you find this information helpful?
Help us improve this page
Please provide feedback or comments
Please sign in to leave a comment