views:

192

answers:

1

I want to animate movement of a selection box in ListView so it will move from old selected item to currently selected. I don't even know where to start - could someone please share ideas how to achieve that or it's impossible to do in WPF.

+1  A: 

http://stackoverflow.com/questions/2258972/animate-selected-item-of-wpf-listbox

Check this. This could give you a start.

After that try animating your border background color to get a virtual translation animation.

Veer
Thanks, but how animating border will help getting visibility of selection box movement?
sha1dy
check this link... http://vbcity.com/blogs/xtab/archive/2009/06/28/background-color-for-wpf-listbox-selected-item.aspxHere the default blue selection will be replaced by virtual selection (which is the selected item's border bg). So you can animate the bg using some color animations. You understood the hack? Else i'll try to post some code when i reach home:)
Veer
I see your point - you suggesting how to animate background of a selected list view item, but I'm looking how to animate selection box itself to move from one selected item to another by repositioning it during animation - and this is where I don't know where to start. Maybe I should use Canvas panel for this?
sha1dy
Think you didn't understand what i suggest. See you want a trasition when your selection changes rite? Let us consider your transition is from 3rd item to 4th. It's a downward transition. Now the animation has to be like this. Your 3rd item's bg size should decrease. Meanwhile 4th item's bg size should increase. This could be achieved using gradients stops.
Veer
oh, now I get it - thanks!
sha1dy