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

RadCarouselPanel Scrolling Problem

2 Answers 28 Views
Carousel
This is a migrated thread and some comments may be shown as answers.
Shreya Goyal
Top achievements
Rank 1
Shreya Goyal asked on 12 Nov 2009, 10:21 AM
Hi
          In RadCaraouselPanel if we are taking Buttons instead of images as given in your example,
 in this case RadCarouselPanel does not scroll on clicking on items(which are buttons here)

Please reply as soon as possible

Thanks in advance
Regards
Shreya

2 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 12 Nov 2009, 11:09 AM
Hi Shreya Goyal,

Well, some control like Button handle mouse events and the carousel panel is unable to capture those handled events. One workaround that you can try is to listen for handled events and scroll the panel manually.

For example:

public Window1()
{
    InitializeComponent();
  
    this.AddHandler(FrameworkElement.MouseLeftButtonDownEvent, 
        new MouseButtonEventHandler(Window1_MouseLeftButtonDown), true);
}
  
void Window1_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
    var senderElement = (FrameworkElement)e.OriginalSource;
    var clickedButton = senderElement.ParentOfType<Button>();
  
    this.carouselPanel.BringItemIntoView(clickedButton, true);
}


Sincerely yours,
Milan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Shreya Goyal
Top achievements
Rank 1
answered on 25 Nov 2009, 09:04 AM
Hi
        Thanx for ur reply. It has solved my issue.


Regards
Shreya
Tags
Carousel
Asked by
Shreya Goyal
Top achievements
Rank 1
Answers by
Milan
Telerik team
Shreya Goyal
Top achievements
Rank 1
Share this question
or