This is a migrated thread and some comments may be shown as answers.

Auto scroll or programmatically scroll

3 Answers 280 Views
Carousel
This is a migrated thread and some comments may be shown as answers.
E
Top achievements
Rank 1
E asked on 04 Jul 2008, 09:24 PM
Is there any way to automatically scroll items?  I see the AutoScroll property but when I set it to true it doesn't seem to do anything.


3 Answers, 1 is accepted

Sort by
0
Mike
Telerik team
answered on 07 Jul 2008, 07:47 AM
Hi,

I hope I got you right and your question is whether RadCarousel can automatically loop its items. If so, the answer is that this feature will be available in a couple of weeks, in the Q2 release.
You can have similar behavior for the current version by using a workaround. Change the SelectedIndex of carousel items container, using a Timer. I've attached a sample project that demonstrates the approach.

All the best,
Mike
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Richard Thurgood
Top achievements
Rank 1
answered on 10 Jul 2008, 01:48 PM
This sample is great - but I was wondering if you could modify it to show me how I can add elements dynamically.  More specifically, I'd like to add RadPanels. 

Here's what I'd like:
- Create a form
- Add 4 RadPanels to the form
- Change the color of each panel (so I can see them clearly)
- Add a RadCarousel to the form

In the code behind:
- Create a method called PopulateCarousel() to add RadPanels to the RadCarousel.
- Call this method in the Form_Load event.
- Create a method called DisplaySelectedPanel() that will stretch the selected panel to full size in the form. This method would be called when this item is clicked in the RadCarousel.

I tried to do this based on the samples and using your sample but couldn't get it to work. I'm sure your sample app can be modified to do this, right?


0
Mike
Telerik team
answered on 14 Jul 2008, 02:00 PM
Hello Richard,

A panel-based carousel scenario would be much more difficult to implement. The main problem is that RadCarousel is optimized to work with graphical elements and images, rendered by the TPF only. Unfortunately, this does not cover the case of rendering nested Windows Forms controls. Even though you can use RadHostItems to bridge several controls in TPF, an important drawback of this approach would be the inconsistently synchronized painting and scaling problems. 
 
That's why I would suggest the following: instead of rotating panels in RadCarousel, you can rotate only snapshot images of these panels. The approach is relatively simple and does not require extensive coding. I've prepared another sample application that can guide you in this case. Here is a screenshots of the design time view of the carousel and panels:
 
Design


Runtime, when you click on a panel image in the carousel it would pop up like this:
 
runtime




Kind regards,
Mike
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Carousel
Asked by
E
Top achievements
Rank 1
Answers by
Mike
Telerik team
Richard Thurgood
Top achievements
Rank 1
Share this question
or