Carousel elements selection

2 posts, 0 answers
  1. xen acronyx
    xen acronyx avatar
    1 posts
    Member since:
    Nov 2009

    Posted 28 Nov 2009 Link to this post

    Hi!
    Can anyone tell me how can i select elements from a carousel with left and right arrows?
  2. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 01 Dec 2009 Link to this post

    Hi xen acronyx,

    Thank you for writing. You can easy change the Carousel SelectedIndex on KeyUp event. For example:

    //handle KeyUp event (in Form Load for example)
    this
    .radCarousel1.KeyUp += new KeyEventHandler(radCarousel1_KeyUp);
    .....
    void radCarousel1_KeyUp(object sender, KeyEventArgs e)
    {          
     if (e.KeyCode == Keys.Left)
     {
      this.radCarousel1.SelectedIndex--;
     }
     else if (e.KeyCode == Keys.Right)
     {
      this.radCarousel1.SelectedIndex++;
     }
    }

    I hope this helps.

    Sincerely yours,
    Peter
    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.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top