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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to load images in the Carousel?

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.

C#

VB

 

Note: The items of the ImageListCollection in the Carousel should contain the CorouselImage.

 

Figure 1: The Carousel images loaded in the Carousel

 

Figure 2: The Carousel images added in the Carousel

 

Sample Links:

C#: http://www.syncfusion.com/downloads/support/directtrac/117819/ze/CarouselImage1053207156

VB: http://www.syncfusion.com/downloads/support/directtrac/117819/ze/CarouselImage_VB1305682135

Article ID: Published Date: Last Revised Date: Platform: Control:
5280 07/29/2015 07/29/2015 WinForms Carousel
Tags:
Did you find this information helpful?
Comments
Larry Jun 27, 2016
Is there a workaround or how do i add click or mousedown events for the image items from the image list collection?
Reply
Larry Jun 27, 2016
Got it. I used picture boxes.
Kannan R [Syncfusion] Jun 27, 2016
Hi Larry, We are glad that, your have found solution for this requirement. Please let us know if you need any further assistance. Regards Kannan
Reply
Walter Contreras Jul 27, 2016
Hello How I can do the reverse process? That is, remove the active image from ImageListCollection
Reply
Vijayalakshmi Roopkumar [Syncfusion] Jul 29, 2016
Hi Walter,

Yes, this requirement can be achieved by handling OnCarouselItemSelectionChanging event andusing Remove method in Carousel.

 

Code snippet [C#]

 

void carousel1_OnCarouselItemSelectionChanging(object sender,CarouselItemSelectionChangingArgs e)

{

Carousel carousel = sender as Carousel;

 

List<CarouselImage> imageList = new List<CarouselImage>();

 

foreach (CarouselImage image in carousel.ImageListCollection)

{

 

imageList.Add(image);

 

}

 

foreach(CarouselImage img in imageList)

{

if (img.ItemImage == e.SelectedImage)

{

 

carousel.ImageListCollection.Remove(img);

 

}

 

}

 

 

 


Sample link: 
WindowsFormsApplication195


Video Link:CarouselImage_New


Regards,

Vijayalakshmi V.R.

Walter Contreras Jul 29, 2016
Thank you. I'll try
Add Comment
You must log in to leave a comment

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