CoverFlow Ordering

2 posts, 0 answers
  1. Barry
    Barry avatar
    11 posts
    Member since:
    Dec 2008

    Posted 07 Jan 2013 Link to this post


    I have a CoverFlow bound to an ObservableCollection. The UI needs to support an operator changing the order of items (Photos) in the coverflow. I have added left and right arrow buttons to each item of the coverflow to support this operation.
     I have also added an OrderNbr property to the class that the control is bound to. The issue that I have is that to make the CoverFLow use the modified ordering I need to completely rebuild the ObservableCollection in the changed order and rebind it to the Coverflow. The visual effect is poor and the operation takes too long to complete.
    I have also tried removing the RadCoverFlowItem and inserting at the new point but this raises an exception due the collection being read only.

    How can I change the order of items in the RadCoverFlow.

  2. Konstantina
    Konstantina avatar
    2332 posts

    Posted 09 Jan 2013 Link to this post

    Hello Barry,

    You could remove/insert the items to the according place in the ObservableCollection bound to the CoverFlow and that should work as expected. Please find attached a sample project, which I created quickly to show you what I mean. On a click of a button I am inserting the selected item in the next index (+1) of its current one. In the demo is not illustrated how to remove the one on the old place, but the approach is the same. You should also set the SelectedItem of the CoverFlow after that.

    Hope this helps.

    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top