LoadLayout exception

4 posts, 1 answers
  1. Stefan
    Stefan avatar
    4 posts
    Member since:
    Jul 2010

    Posted 10 Jan 2011 Link to this post

    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.
  2. Answer
    George
    Admin
    George avatar
    1332 posts

    Posted 13 Jan 2011 Link to this post

    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>>
  3. DevCraft banner
  4. Jens
    Jens avatar
    27 posts
    Member since:
    Mar 2009

    Posted 18 Jan 2011 Link to this post

    Hi,

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

    Regards
    Jens
  5. George
    Admin
    George avatar
    1332 posts

    Posted 21 Jan 2011 Link to this post

    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>>
Back to Top