I’ve got a “toolbar” type control that is basically a set of buttons for “groups” of other buttons. The buttons and groups are arranged horizontally along the top of my window.
What I’d like is to have, when the user clicks one of the buttons for one of the groups, the list (probably an ItemsPanel) of other buttons for that group expands from being 0 width to being however wide it needs to be to hold the list of buttons.
So you’d start off with something like this:
_______
|G|G|G|
-------
where G is a group button. And if you click on the middle group button, you’ll end up with this:
_______________
|G|G|B|B|B|B|G|
---------------
where the original group buttons are still there and the new buttons for the selected group have “grown” into place.
What’s the best way to make this happen? Should I use a ListBox as the outer container and trigger an animation when IsSelected changes on one of the ListBoxItems? If so, how do I write an animation that goes from 0 width (or hidden) to “full width” (whatever that may be)?
Thanks!
I’d use fluid layout, not that this is the best way or anything, but its one way. Basically allows you to animate between say
Autowidth and0width.