1
votes

With a list view containing items I can reorder which gives a nice UI effect.

I have my item source for the list view hooked up to an observable collection. Is there anyway with the framework I could programatically simulate a reorder and give the same effect you would have if you actually reordering?

The only way I've been able to slightly achieve this is to literally clear all the items from my data source then repopulate after shuffling the items, however it doesn't look nice.

1
Look at the code on CodePlex for ReorderListbox - he does what you're asking for. WP 7/8, so I'm not sure how portable it is. - Todd Main

1 Answers

0
votes

Well, you could sort the items in code-behind in a temporary helper array and then according to the order they are in in the sorted one start periodically moving items one-by-one in a small time interval (with DispatcherTimer) withing the collection - remove at it's index and insert somewhere it belongs. I think there is no built-in way to do it in a simpler manner.