views:

321

answers:

0

Hi, I have the following layout in WPF

<grid>
<row height=auto>
<border>
<listbox>
<border?
</row>
<row height=*>
<othercontent>
</row>
</grid>

Using MVVM and have listbox itemsource bound. I am using a wrapPanel in the grid, and have scrolling disabled so the Grid row height will grow and shrink based on the list box contents. This is all working fine.

What I would like, is to be able to animate the growing and shrinking of the listbox (or the border containing it, or the grid row that has the auto-height). What element should I be using - a trigger on SizeChanged on the border?

Also I when my ItemsSource changes, I would like my listbox items to fade out, then the resize, then the new items to fade in.

Any help much appreciated. Thanks, Chris