I have created a window, where two vertical -oriented stack panel(left and right) are in the third, horizontal-oriented stackpanel. Left stack panel holds a number of controls and a button >Hide<, binded to command. And I dlike to animate a "hiding" right stackpanel and resize a window to the width of only left stackpanel. How to do this in the most simple way? I have found WPF stackpanel visibilty animation but , it will not resize a window.
My code is:
<Window x:Class="Namespace.MainWindow"
...
x:Name="ololo"
Height="400" Width="500">
.....
<StackPanel Orientation="Horizontal">
<StackPanel x:Name="Left" Orientation="Vertical">
<Button Margin="0,10,0,0" Command="{Binding HideCommand}">Hide</Button>
</StackPanel>
<StackPanel x:Name="Right" Orientation="Vertical">
<!--<Controls>-->
</StackPanel>
</StackPanel>