Carousel Top Item

4 posts, 0 answers
  1. Zubair
    Zubair avatar
    13 posts
    Member since:
    Nov 2011

    Posted 26 Mar 2012 Link to this post

    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.
  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 26 Mar 2012 Link to this post

    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 >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Zubair
    Zubair avatar
    13 posts
    Member since:
    Nov 2011

    Posted 26 Mar 2012 Link to this post

    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
  5. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 26 Mar 2012 Link to this post

    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 >>
Back to Top