Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > Carousel > Carousel having only 2 items

Not answered Carousel having only 2 items

Feed from this thread
  • Jog Rad avatar

    Posted on Dec 21, 2011 (permalink)

    Hi,

    I have an issue regarding the display of items if ItemsPerPage is set to 2 and the carousel ItemSource have 2 items only. Yes it displayed the 2 items properly, however when I try to click the 2nd item, the first item is moved to the background (i.e. not displayed). And  when I tried to click again the 2nd item, my expected behavior is that the 1st item would show up but it doesn't.

    Note: Vertical and Horizontal scroll bars are set to hidden because we don't want to use those.

    Reply

  • Maya Maya admin's avatar

    Posted on Dec 22, 2011 (permalink)

    Hi,

    The behavior you experience is the expected one since when the ItemsPerPage property is set to 2, the topmost position is the one on the right - that is why when you click on the left item, it goes to that top position and the other item moves out of the view port. 
    What you can try is to set ItemsPerPage to 3, thus this topmost position will be placed in the center and none of the items will be hidden on a single click.
    The other possible approach would be to leave ItemsPerPage set to 2 and set CanUserSelect property of RadCarousel to "False" In that way the carousel will not be scrolled at all on clicking on an item.
    I am attaching a sample project illustrating both approaches.
    Please take a look at it and let me know whether any of it is appropriate for you scenario.

     

    All the best,
    Maya
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Attached files

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > Carousel > Carousel having only 2 items
Related resources for "Carousel having only 2 items"

WPF Carousel Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]