Dynamic horizontal/vertical split change with AvalonDock
I have two areas on my interface (using WPF) that I want to be splitted. And a button to change between horisontal and vertical split. I'm using AvalonDock. When I change Orientation parameter in code before running it all works. <ad:DockingManager Grid.Row="1"> <ad:LayoutRoot> <ad:LayoutPanel x:Name="LayoutPanel1" Orientation="Vertical" IsMaximized="True"> <ad:LayoutDocumentPane x:Name="DocPane1" ShowHeader="True"> <ad:LayoutDocument Title="Spectrogram" CanClose="False" CanFloat="False"> <wpf:CartesianChart Series="{Binding MySeries}" Zoom="X"/> </ad:LayoutDocument> </ad:LayoutDocumentPane>