WPF Animation of border width

Posted by Dave Perry on Stack Overflow See other posts from Stack Overflow or by Dave Perry
Published on 2010-02-19T09:30:02Z Indexed on 2010/05/27 22:01 UTC
Read the original article Hit count: 370

Filed under:
|
|

I've got a dockpanel on my ui as follows;

<DockPanel>
    <Border DockPanel.Dock="Top">Header</Border>
    <Border DockPanel.Dock="Bottom">My footer</Border>
    <Border DockPanel.Dock="Left">Menu</Border>

    <Border>Content</Border>
 </DockPanel>

What I want to do is to have a storyboard animation to show / hide the Menu on the left-hand side. I've got my border to increase the width when it has loaded but I want a way to close / reopen it. I need a button somewhere but I want this to trigger the animation in the border control rather than itself. Ideally I was thinking of something like the Toolbox / Server Explorer in visual studio.

Does anyone have any pointers / examples for getting started?

Thanks

© Stack Overflow or respective owner

Related posts about wpf

Related posts about animation