Hi!
I'm evaluating the DockView control and have problem loading a saved layout.
1) I run my application and save the layout immediately with the
DockContainer.SaveLayout() method to a local string.
2) I then fool around with the DockViews and relocate them to different locations.
3) Then I want to reload to the same layout as I had when the application started. So I call the
DockContainer.LoadLayoutXml() method with the local string as parameter.
The result is not what I wanted. Instead the DockContainer.Views collection only contains two Views.
Apparently this seem not to be the way to do this. Even if the instructions clearly describe this as a piece of cake at
http://www.essentialobjects.com/doc/5/dockview/overview.aspx -> EO.Wpf 2013.02 -> EO.Wpf DockView -> Saving/loading layout.
How shall I solve this? I simply need a reset functionality to restore the layout of the docking views when needed.
Best regards,
/Steffe
I include my XAML code.
Code: XML
<Window x:Class="WpfApplication1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:eo="http://schemas.essentialobjects.com/wpf/"
Title="MainWindow" Height="800" Width="1200">
<eo:DockContainer Name="eoDockContainer">
<!-- Tree, file info and summery views -->
<eo:DockView Dock="Left" Width="200" Name="eoLeft">
<eo:DockView.ChildViews>
<!-- TreeView -->
<eo:DockView Dock="Top" Height="500">
<eo:DockItem Name="eoTreeView" Title="TreeView" />
</eo:DockView>
<eo:DockView Dock="Bottom">
<eo:DockView.ChildViews>
<!-- FileView -->
<eo:DockView Dock="Top" Height="150">
<eo:DockItem Name="eoFileInfoView" Title="FileInfoView" />
</eo:DockView>
<!-- SummeryView -->
<eo:DockView Dock="Bottom" Height="150">
<eo:DockItem Name="eoSummeryView" Title="SummeryView" />
</eo:DockView>
</eo:DockView.ChildViews>
</eo:DockView>
</eo:DockView.ChildViews>
</eo:DockView>
<!-- List, properties and basic properties view -->
<eo:DockView Dock="Right">
<eo:DockView.ChildViews>
<!-- List and basic properties view -->
<eo:DockView Dock="Left">
<eo:DockView.ChildViews>
<!-- ListView -->
<eo:DockView Dock="Top">
<eo:DockItem Name="eoListView" Title="ListView">
<StackPanel Orientation="Vertical">
<Button Click="Button_Click_1" Content="Load" Height="100" Width="100" />
<Button Click="Button_Click_2" Content="Save" Height="100" Width="100" />
</StackPanel>
</eo:DockItem>
</eo:DockView>
<!-- BasicPropertiesView-->
<eo:DockView Dock="Bottom" Height="200">
<eo:DockItem Name="eoBasicPropertiesView" Title="BasicPropertiesView" />
</eo:DockView>
</eo:DockView.ChildViews>
</eo:DockView>
<!-- Properties view -->
<eo:DockView Dock="Right" Width="300">
<eo:DockItem Name="eoPropertiesView" Title="PropertiesView" />
</eo:DockView>
</eo:DockView.ChildViews>
</eo:DockView>
</eo:DockContainer>
</Window>