This is a migrated thread and some comments may be shown as answers.

Saving Layout incomplete ?

6 Answers 190 Views
Docking
This is a migrated thread and some comments may be shown as answers.
eric
Top achievements
Rank 1
eric asked on 08 Dec 2010, 03:29 PM
Hello,

I've tried to save the layout of my panes with the Docking SaveLayout / LoadLayout Method.

It works as long as my panes are docking in the main container.

But if one pane is floating, i can successfully save information about it (only if i move another pane meanwhile) but when loading the layout after restarting the application, only the docking windows appear even if it seems that correct information are saved in the xml file.

<?xml version="1.0" encoding="utf-8" ?> 
- <RadDocking>
- <DocumentHost>
- <RadSplitContainer>
- <Items>
- <RadPaneGroup SerializationTag="AccueilPaneGroup" SplitterChange="781" SelectedIndex="0">
- <Items>
  <RadPane SerializationTag="ActionsFrequentesPane" IsDockable="True" Title="Actions fréquentes" Header="Actions fréquentes" CanUserClose="False" CanUserPin="False" CanFloat="True" /> 
  </Items>
  </RadPaneGroup>
  </Items>
  </RadSplitContainer>
  </DocumentHost>
- <SplitContainers>
- <RadSplitContainer Dock="DockedLeft" Width="240" RelativeWidth="100" RelativeHeight="100" IsAutoGenerated="True">
- <Items>
- <RadPaneGroup RelativeWidth="100" RelativeHeight="100" IsAutoGenerated="True" SelectedIndex="0">
- <Items>
  <RadPane SerializationTag="ListeSimpleParametrablePane" IsDockable="True" Title="Liste paramétrable" Header="Liste paramétrable" CanUserClose="False" CanUserPin="False" CanFloat="True" /> 
  </Items>
  </RadPaneGroup>
  </Items>
  </RadSplitContainer>
- <RadSplitContainer InitialPosition="FloatingDockable" FloatingWidth="220" FloatingHeight="300" FloatingX="1645" FloatingY="285.04" IsInOpenWindow="True" RelativeWidth="100" RelativeHeight="100" IsAutoGenerated="True">
- <Items>
- <RadPaneGroup RelativeWidth="100" RelativeHeight="100" IsAutoGenerated="True" SelectedIndex="0">
- <Items>
  <RadPane SerializationTag="GrapheParametrablePane" IsDockable="True" Title="Graphe paramétrable" Header="Graphe paramétrable" CanUserClose="False" CanUserPin="False" CanFloat="True" /> 
  </Items>
  </RadPaneGroup>
  </Items>
  </RadSplitContainer>
  </SplitContainers>
  </RadDocking>

I can see the RadSplitContainer with FloatingDockable position but the pane is not visible...

Any Help ? Or is it not possible to save layout with floating panes ?

Many thanks !

6 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 11 Dec 2010, 10:14 AM
Hello,

We are not aware of such problem with RadDocking control. Please, refer to our online examples where you can find an example how to save/load the layout - http://demos.telerik.com/wpf/?Docking/SaveLoadLayout.

Also, if you give us more details about your scenario it would be very helpful in further pinpointing the problem.
 

Kind regards,
George
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
Buzz
Top achievements
Rank 1
answered on 20 Jan 2011, 10:34 PM
eric,
I'm currently experiencing this problem.  Any chance you found what was going on?

Buzz
0
Arnstein
Top achievements
Rank 1
answered on 24 Jan 2011, 09:52 AM
I'm running into an exception when a layout is saved with a floating window, after restarting the application.

System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Windows.Controls.RadDocking.ShowWindow(ToolWindow window)

If I'm first  loading a layout without a floating window it doesn't fail.  The layout I'm trying to load:

- <RadDocking>
- <SplitContainers>
- <RadSplitContainer Dock="DockedTop" Orientation="Vertical">
- <Items>
- <RadPaneGroup SplitterChange="443" SelectedIndex="0">
- <Items>
  <RadPane SerializationTag="GebyrSoekPane" IsDockable="True" />
  </Items>
  </RadPaneGroup>
- <RadPaneGroup SerializationTag="Panegroup" SplitterChange="383" SelectedIndex="0">
- <Items>
  <RadPane SerializationTag="Gebyrdetaljer" IsDockable="True" Title="Gebyrdetaljer" Header="Gebyrdetaljer" CanUserClose="False" />
  </Items>
  </RadPaneGroup>
  </Items>
  </RadSplitContainer>
- <RadSplitContainer InitialPosition="FloatingDockable" FloatingWidth="312" FloatingHeight="370" FloatingX="2665" FloatingY="341" IsInOpenWindow="True" RelativeWidth="100" RelativeHeight="100" IsAutoGenerated="True">
- <Items>
- <RadPaneGroup RelativeWidth="100" RelativeHeight="100" IsAutoGenerated="True" SelectedIndex="0">
- <Items>
  <RadPane SerializationTag="Avtaledetaljer" IsDockable="True" Title="Avtaledetaljer" Header="Avtaledetaljer" CanUserClose="False" />
  </Items>
  </RadPaneGroup>
  </Items>
  </RadSplitContainer>
  </SplitContainers>
  </RadDocking>

0
George
Telerik team
answered on 26 Jan 2011, 09:22 AM
Hello,

 
We are aware of this problem with Load layout of the RadDocking control. I would suggest you to call the LoadLayout() method in the Loaded event handler. I hope this helps.

All the best,
George
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Arnstein
Top achievements
Rank 1
answered on 26 Jan 2011, 02:39 PM
Thanks George, that works. But it would require some refactoring. Is there any chance that the docking will be less sensitive about when you load the layout in the Q1 2011 release?

Arnstein
0
George
Telerik team
answered on 31 Jan 2011, 10:02 AM
Hi Arnstein,

 
Yes, it could be done. We are planning to fix these problems for the Q1 release.

Kind regards,
George
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
Docking
Asked by
eric
Top achievements
Rank 1
Answers by
George
Telerik team
Buzz
Top achievements
Rank 1
Arnstein
Top achievements
Rank 1
Share this question
or