Ticket Q372824
Visible to All Users

How to properly save and restore layout using the DockManager

created 12 years ago

hi,
I'm dynamically reloading my DockLayoutManager
The saved layoutstream that I have correctly has my layoutPanel as Item2 in the ITems collection.
However, when I try to get the item after calling DockLayoutManager.RestoreFromLayoutStream(layout);

DockLayoutManager.GetItem("Pivot_1f380fe90d52429ea3fed0dc509cb385_LayoutPanel") returns null yet
DockLayoutManager.GetItem("dockItem1") correctly returns the first item. Why is this? I cannot seem to access the layoutPanels from the layoutstream after calling RestoreFromLayout.

<?xml version="1.0"?>
-<XtraSerializer application="DockLayoutManager" version="1.0"> <property isnull="true" name="#LayoutVersion"/> -<property name="$DockLayoutManager" value="DockLayoutManager" iskey="true"> <property name="ManualClosedPanelsBarVisibility">false</property> -<property name="Items" value="2" iskey="true"> -<property isnull="true" name="Item1" iskey="true"> <property isnull="true" name="ParentCollectionName"/> <property isnull="true" name="ParentName"/> <property name="TypeName">LayoutGroup</property> <property name="SerializableSelectedTabPageIndex">-1</property> <property name="Orientation">Horizontal</property> <property name="Name">dockItem1</property> </property> -<property isnull="true" name="Item2" iskey="true"> <property name="ParentName">dockItem1</property> <property name="TypeName">LayoutPanel</property> <property name="AllowRename">true</property> <property name="AllowHide">false</property> <property name="SerializableFloatingOffset">0,0</property> <property name="AllowDockToDocumentGroup">false</property> <property isnull="true" name="ParentCollectionName"/> <property name="Caption" type="System.String">Pivot Grid</property> <property name="Name">Pivot_1f380fe90d52429ea3fed0dc509cb385_LayoutPanel</property> </property> </property> </property> </XtraSerializer>

Comments (2)
DevExpress Support Team 12 years ago

    Please give us additional time. We will answer you ASAP.

    Alexander E (DevExpress) 12 years ago

      Hi Alan,
      Please accept our apologies for the delayed answer.
      I have researched your issue and it appears that you are using our DXDocking component for WPF or Silverlight. Please clarify which platform you are using and specify the version of our components.
      In the meantime, I have tried to reproduce the issue with DXDocking for WPF v12.2.7, but without success. I have attached a sample to demonstrate my approach. Would you please clarify your scenario in greater detail? I will also appreciate it greatly if you modify my sample.
      Thank you for your cooperation.

      Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

      Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.