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

Custom Scroll Buttons

2 Answers 155 Views
Carousel
This is a migrated thread and some comments may be shown as answers.
UIdev
Top achievements
Rank 1
UIdev asked on 09 Jun 2009, 12:11 AM
Hi,

I've made a simple program with a RadCarousel in it.  The thing is, I would like to use my own Buttons (outside the carousel) to scroll through the RadCarousel instead of the carousel's default horizontal/vertical scrollbars.  Is there any way to tell the RadCarousel to scroll one way or the other from inside a Button's MouseLeftButtonDown event handler?  I've been trying to achieve this through RaiseSelectionChangedEvent (but can't seem to access the selected item's index) or ScrollViewer (but can't/don't know how to access the carousel's internal ScrollViewer).  I haven't worked a lot with scrolling in WPF before, so I may be missing something obvious.  Any light you could shed on this problem would be very much appreciated!

Thanks,

UIdev

2 Answers, 1 is accepted

Sort by
0
Accepted
Milan
Telerik team
answered on 09 Jun 2009, 07:23 AM
Hi UIdev,

The RadCarouselPanel has an API that allows you to control the movement of the carousel control. Here is how you can use the API:

this.carousel.FindCarouselPanel().LineDown(); // moves to the next item  
this.carousel.FindCarouselPanel().LineUp(); // moves to the previous item  
this.carousel.FindCarouselPanel().PageUp(); // moves to the previous page  
this.carousel.FindCarouselPanel().PageDown(); // moves to the next page  
this.carousel.FindCarouselPanel().MoveBy(10); // moves by a specified amount 

Here you can find more information about restyling the navigation controls - http://www.telerik.com/community/forums/wpf/carousel/controltemplate-radcarousel-scrollviewer.aspx
I am also sending you a sample application that demonstrates several ways to modify and restyle the navigation controls.
Hope this helps.

Regards,
Milan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
UIdev
Top achievements
Rank 1
answered on 10 Jun 2009, 02:13 AM
Milan,

LineUp and LineDown were just the functions I was looking for.  Thanks so much for the help and the great solution!

-UIdev
Tags
Carousel
Asked by
UIdev
Top achievements
Rank 1
Answers by
Milan
Telerik team
UIdev
Top achievements
Rank 1
Share this question
or