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

Carousel Top Item

3 Answers 89 Views
Carousel
This is a migrated thread and some comments may be shown as answers.
Zubair
Top achievements
Rank 1
Zubair asked on 26 Mar 2012, 12:07 PM
If item per page is greater than total item then i have to click one more time to bring the item in the view page.
i want to avoid this.
how can i do this in XAML?

Thanks in advance.

3 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 26 Mar 2012, 12:18 PM
Hi Zubari,

You can set ItemsPerPage property of the RadCarouselPanel:

<telerik:RadCarousel  >
        <telerik:RadCarousel.ItemsPanel>
            <ItemsPanelTemplate>
                <telerik:RadCarouselPanel ItemsPerPage="2" />
            </ItemsPanelTemplate>
        </telerik:RadCarousel.ItemsPanel>
    </telerik:RadCarousel>
 

All the best,
Maya
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Zubair
Top achievements
Rank 1
answered on 26 Mar 2012, 12:55 PM
As per my requirement items per page should be 3 
and the above describe behaviour happens when item source has less than 3 items.

Thanks
0
Maya
Telerik team
answered on 26 Mar 2012, 01:21 PM
Hello Zubair,

Actually, the behavior you get will be the expected one. What you can try is to call BringDataItemIntoView method of RadCarouselPanel with the item you want to be displayed initially. In case you require this to be achieved only in xaml (without any code in the code-behind), you can try using attached behavior.
I am attaching a sample project illustrating this approach. Please take a look at it and let me know whether it corresponds to your requirements. 

Kind regards,
Maya
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
Carousel
Asked by
Zubair
Top achievements
Rank 1
Answers by
Maya
Telerik team
Zubair
Top achievements
Rank 1
Share this question
or