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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to load images in the Carousel?

Platform: WinForms |
Control: Carousel |
Published Date: July 29, 2015 |
Last Revised Date: July 29, 2015
Tags:

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

ADD COMMENT
You must log in to leave a comment
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

Please sign in to access our KB

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

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