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

LoadLayout exception

3 Answers 119 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Stefan
Top achievements
Rank 1
Stefan asked on 10 Jan 2011, 05:17 PM
Hi. I am experimenting with Rad Docking and have a problem with save/load layout. I'm using the code supplied in this article http://www.telerik.com/help/silverlight/raddocking-features-save-load-layout.html

Saving and loading work fine when my RadPaneGroups are all docked. However when a RadPaneGroup is floating & the layout is saved, a subsequent LoadLayout call throws this exception:

{System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Windows.Controls.RadDocking.ShowWindow(ToolWindow window)
   at Telerik.Windows.Controls.RadDocking.OpenInToolWindow(RadSplitContainer container)
   at Telerik.Windows.Controls.RadDocking.AddSplitContainer(RadSplitContainer radSplitContainer)
   at Telerik.Windows.Controls.Docking.DockingLayoutFactory.LoadDocking(XmlReader reader)
   at Telerik.Windows.Controls.RadDocking.LoadLayout(Stream source, Boolean raiseEventsIfNoSerializationTag)
   at Telerik.Windows.Controls.RadDocking.LoadLayout(Stream source)
   at RadControlsSilverlightApp1.MainPage..ctor()
   at RadControlsSilverlightApp1.App.Application_Startup(Object sender, StartupEventArgs e)
   at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)}

This is the XML that is being loaded:
<?xml version="1.0" encoding="utf-8" ?>
<RadDocking>
  <DocumentHost>
    <RadSplitContainer>
      <Items>
        <RadPaneGroup SelectedIndex="0">
          <Items>
            <RadDocumentPane SerializationTag="DocPane" IsPinned="True" IsDockable="True" Title="Document pane" Header="Document pane" CanFloat="False" />
          </Items>
        </RadPaneGroup>
      </Items>
    </RadSplitContainer>
  </DocumentHost>
  <SplitContainers>
    <RadSplitContainer Dock="DockedLeft" Width="240">
      <Items>
        <RadPaneGroup SelectedIndex="0">
          <Items>
            <RadPane SerializationTag="Pane1" IsDockable="True" Title="Pane 1" Header="Pane 1" CanDockInDocumentHost="False" />
            <RadPane SerializationTag="Pane2" IsDockable="True" Title="Pane 2" Header="Pane 2" CanDockInDocumentHost="False" />
          </Items>
        </RadPaneGroup>
      </Items>
    </RadSplitContainer>
    <RadSplitContainer Dock="DockedRight" Width="240">
      <Items>
        <RadPaneGroup SelectedIndex="-1">
          <Items />
        </RadPaneGroup>
      </Items>
    </RadSplitContainer>
    <RadSplitContainer InitialPosition="FloatingDockable" FloatingWidth="220" FloatingHeight="300" FloatingX="605" FloatingY="188" IsInOpenWindow="True" RelativeWidth="100" RelativeHeight="100" IsAutoGenerated="True">
      <Items>
        <RadPaneGroup RelativeWidth="100" RelativeHeight="100" IsAutoGenerated="True" SelectedIndex="0">
          <Items>
            <RadPane SerializationTag="Pane3" IsDockable="True" Title="Pane 3" Header="Pane 3" CanDockInDocumentHost="False" />
          </Items>
        </RadPaneGroup>
      </Items>
    </RadSplitContainer>
  </SplitContainers>
</RadDocking>


Any help or insight greatly appreciated.

3 Answers, 1 is accepted

Sort by
0
Accepted
George
Telerik team
answered on 13 Jan 2011, 02:28 PM
Hi Stefan,

I will paste my answer here:

We are aware of this problem with RadDocking control. I would suggest you to load the layout in the loaded event handler of the MainPage. I hope this helps.
 

Best wishes,
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
Jens
Top achievements
Rank 1
answered on 18 Jan 2011, 01:21 PM
Hi,

we are running into the same problem. Could you please tell us, when it will be fixed?

Regards
Jens
0
George
Telerik team
answered on 21 Jan 2011, 01:00 PM
Hello Jens,

We are working on the problem. You can track this progress in our Public Issue Tracking System (PITS) with Issue ID = 4656.

 

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>>
Tags
Docking
Asked by
Stefan
Top achievements
Rank 1
Answers by
George
Telerik team
Jens
Top achievements
Rank 1
Share this question
or