Bind to Top Most Item in RadCarousel

4 posts, 0 answers
  1. Jason Fox
    Jason Fox avatar
    7 posts
    Member since:
    Jul 2009

    Posted 17 Jun 2011 Link to this post

    I'm using a RadCarousel control bound to a collection of custom objects.  What I want to do is have a textblock's text property bound to one of the current top most item's string properties.  So, as the carousel is moved, the text block will automatically update and show the appropriate string value.  If I bind to the RadCarousel's selectedItem property it only shows me the string value when I click on a panel object.  Is there a way to bind to the object that is topmost?
  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 20 Jun 2011 Link to this post

    Hello Jason Fox,

    Generally, the topmost item is the TopContainer. You may find it as a property of the RadCarouselPanel.
    Let me know in case you need any further assistance.
     

    Greetings,
    Maya
    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. Jason Fox
    Jason Fox avatar
    7 posts
    Member since:
    Jul 2009

    Posted 23 Aug 2011 Link to this post

    Ok, this is getting me closer.  The issue I'm seeing now is that when I scroll the items to the extreme left or right there isn't an actual item in the center of the path.  The "TopContainerChanged" event doesn't fire when the items at the ends of the collection are moved out of the top most postion.  So basically I'm using the "TopContainerChanged" event to update a label as new items are moved into that postion.  When the last item moves out of that position, the event doesn't fire again so my label doesn't clear as I would like it to.  Shouldn't the event fire when the top most item goes from something to null?  Is there an event that fires when either the radcarousel or radcarouselpanel is scrolled? I could create a workaround if there is an event like that.
  5. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 24 Aug 2011 Link to this post

    Hi Jason Fox,

    Actually, the topmost item in this case does not get null, that is why the corresponding event is not fired. The CarouselItem in the TopContainer stays to the last one that has been in the top container. What you may try is to verify whether the last item is before/after the center. This forum thread might be helpful in this case.


    Best wishes,
    Maya
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Back to Top