I am trying to implement a continuous list in the XamCarouselListBox but have found some very strange behaviour in the scrolling actions. I started with the following sample:
http://blogs.infragistics.com/blogs/ctaylor/archive/2008/06/17/carousel-listbox-selection.aspx
When the IsListContinues property is set to True, clicking on the right-hand items works until you select the first or second item in the databound list... then the carousel jumps that item back to beginning and scrolls the wrong direction. I have tried numerous ways to fix it but nothing great. I have one solution that works for carousels that have a definite "left & right side" or "top & bottom" (track which side the mouse is clicked on, then call the NavigateToNext/PreviousItem the required number of times) but of course it would break with custom paths that move around a lot and it also doesn't scroll very nicely (if you call it twice, you only see the second scroll).
Any thoughts? I think the problem might be with the SetVerticalOffset method call, but I can't find anything helpful on the net about alternatives.
I think there should be a better way since the navigator "next page" and "next item" button presses scroll the list very nicely.. they just don't change the selected item when they scroll... and what I want is the user to be able to "select" an item in view and have it scroll to the center as well.
ViewSettings contains properties for setting the prefix and suffix offsets. I find that setting this property for continuous lists changes how the list scrolls. You may be able to simulate the effect you want. You may find a limitation with continuous lists with this control as we have had to come up with a way to scroll items in from nowhere when the number of items is greater than the number of visible items (ItemsPerPage).
To improve the way continuous lists work with this control, please send us your feedback of how you would like this control to work when IsContinuous is set to true (based on your usage of this control).
http://devcenter.infragistics.com/Protected/RequestFeature.aspx
Thank you!
Thanks, I'll try and play with the prefix and suffix offsets to see if that makes a difference (or at least helps). FYI - I also sent a developer support request and received a reply that my issue was being attached to an already known limitation that the Infragistics development team hoped to address sometime soon. I believe the development issue was #5887.
But aside from that, I'm fillng in a request form anyways... here's the description of it:
-----begin---- -
I think it would be fantastic (and solve a lot of questions about how to get Carousels scrolling through code-behind) if there were navigator-like methods to scroll the carousel by a certain number of items. Today, you can scroll 1 item, a page of items, or use the SetVerticalOffset method to simulate scrolling an item to the "center" position. I envision a method like:
GetCarouselPanel(XamCarousel).ExecuteCommand(XamCarouselPanelCommands.NavigateForward, 5);
Where (NavigateForward,5) acts like calling the NavigateToNextItem 5 times ... I've tried simulating this behaviour in the code behind by calling NavigateToNextItem five times, but only the last navigate is seen so the list "jumps" ahead 4 positions and scrolls the last position into place. I think this kind of method would easily satisfy all the scrolling needs you could imagine without too much added complexity and I'm guess it might not be that hard to implement since the control is already capable of doing some nice scrolling during the NavigateTo__Page commands.
-----end-----
I hope that makes sense to whomever reads the requests... Through all the other code you've posted, this would make it possible to scroll whereever in the list you'd like... We could implement go forward 1, 2, or PageSize type of scenarios for really long lists .. heck, even scroll a random number of times for "make a random selection" type events. That would be neat.
Thanks, Greg
Hi Greg,
Thanks for the excellent feedback. Look for changes in the carousel in an upcoming release.
In the meantime, another suggestion is to ask the support engineer to come up with a work-around for you.
Thanks,