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

Bind to Top Most Item in RadCarousel

3 Answers 126 Views
Carousel
This is a migrated thread and some comments may be shown as answers.
Jason Fox
Top achievements
Rank 1
Jason Fox asked on 17 Jun 2011, 04:27 PM
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?

3 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 20 Jun 2011, 09:27 AM
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
0
Jason Fox
Top achievements
Rank 1
answered on 23 Aug 2011, 04:11 PM
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.
0
Maya
Telerik team
answered on 24 Aug 2011, 12:14 PM
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 >>

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