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

Carousel having only 2 items

1 Answer 100 Views
Carousel
This is a migrated thread and some comments may be shown as answers.
Jog Rad
Top achievements
Rank 1
Jog Rad asked on 22 Dec 2011, 04:39 AM
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.

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 22 Dec 2011, 10:16 AM
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 >>

Tags
Carousel
Asked by
Jog Rad
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or