BringItemIntoView not working on Loaded Event

10 posts, 2 answers
  1. Scott
    Scott avatar
    42 posts
    Member since:
    Oct 2007

    Posted 21 Jun 2010 Link to this post

    Hello,
    I am trying to call the following code during the Loaded event and it does not work:

    Carousel.CarouselItem item = (Carousel.CarouselItem)Scenes.Children[3]; 
    Scenes.BringItemIntoView(item, true); 

    I have similar code being called for the MouseDown event and it works fine. I know that I can call the .MoveBy method, but I'd like to move to a particular item in the list. Please not that I am using a CarouselPanel with custom UserControl as the child nodes.
  2. Milan
    Admin
    Milan avatar
    1989 posts

    Posted 22 Jun 2010 Link to this post

    Hi Scott,

    Setting AutoLoadItems to false should fix the problem.


    Best wishes,
    Milan
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
  4. Scott
    Scott avatar
    42 posts
    Member since:
    Oct 2007

    Posted 22 Jun 2010 Link to this post

    Milan, as you can see from my CarouselPanel definition, I do have AutoLoadItems set to False:

    <telerik:RadCarouselPanel Name="Scenes" AutoLoadItems="False" Background="Transparent" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" MouseDown="CarouselPanel_MouseDown" ItemsPerPage="7" Loaded="SelectSceneLoaded"

    Thoughts?
  5. Answer
    Milan
    Admin
    Milan avatar
    1989 posts

    Posted 28 Jun 2010 Link to this post

    Hello Scott,

    It seems that there is a bug in the BringItemIntoView method which is already scheduled to be fixed. In the meantime you can use the MoveBy method of RadCarouselPanel to scroll the panel by the specified number of positions.

    Thank you for your reporting the issue. I have updated your Telerik points.


    Sincerely yours,
    Milan
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Scott
    Scott avatar
    42 posts
    Member since:
    Oct 2007

    Posted 29 Jun 2010 Link to this post

    Thank you for validating this for me Milan. I tried to resolve this, so I will use MoveBy in the meantime until the next release resolves the issue.
  7. Scott
    Scott avatar
    42 posts
    Member since:
    Oct 2007

    Posted 21 Jul 2010 Link to this post

    Milan,
    I was assuming that this issue was going to be fixed in the 2010 Q2 release, yet I see no changes listed in the release notes for the Carousel control. Do you have any idea when this issue will be resolved? I do not see it in PITS either, should I add it? 

    Since I've switched to the Crousel instead of the CarouselPanel, I'm actually using BringDataItemIntoView but am having the same results.

  8. Milan
    Admin
    Milan avatar
    1989 posts

    Posted 21 Jul 2010 Link to this post

    Hello Scott,

    The issue for RadCarouselPanel is still unresolved. We will try to fix the issue as soon as possible.

    Since you are now using RadCarousel you need to set AutoLoadItems to false to resolve the problem with calling BringDataItemIntoView in the Loaded event.


    Kind regards,
    Milan
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  9. Scott
    Scott avatar
    42 posts
    Member since:
    Oct 2007

    Posted 21 Jul 2010 Link to this post

    Milan,
    AutoLoadItems is not a member of RadCarousel, only RadCarouselPanel.
  10. Answer
    Milan
    Admin
    Milan avatar
    1989 posts

    Posted 21 Jul 2010 Link to this post

    Hi Scott,

    You can easily customize the RadCarouselPanel for a given RadCarousel using the ItemsPanel property of RadCarousel.

    <telerik:RadCarousel Name="RadCarousel1">
        <telerik:RadCarousel.ItemsPanel>
            <ItemsPanelTemplate>
                <telerik:RadCarouselPanel AutoLoadItems="false" ItemsPerPage="3" />
            </ItemsPanelTemplate>
        </telerik:RadCarousel.ItemsPanel>
    </telerik:RadCarousel>


    All the best,
    Milan
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  11. Scott
    Scott avatar
    42 posts
    Member since:
    Oct 2007

    Posted 21 Jul 2010 Link to this post

    Great, I will give this a try. Thanks Milan.
Back to Top
UI for WPF is Visual Studio 2017 Ready