Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
290
UltraDockManager.LoadFromXml creates new panes objects
posted

Hi,

I am planning to create default layout for my application.
I have tried using ultraDockManager.LoadFromXml(stream), but I have some problems using this approach:
1. As far that I can get, this method actually re-instantiate every pane.
Objects in ultraDockManager.ControlPanes are all brand new.
This can cause some problems in application if somewhere there is reference to the old object.
(I am resetting layout on the fly, user can reset layout every time)
Example: exception "cannot access a disposed object"

2. I save the xml using ultraDockManager.SaveAsXML(stream) method and I see that the xml save panel size in pixel. Can we save by percentage ('%'), since user can use our application in many kind of monitor resolution?

Those are my problems using LoadFromXml. The first one is high priority, the second one is lower.
Is there another easy way to set default layout without re-instantiate panes object?

Thanks.

Parents
No Data
Reply
  • 48586
    Verified Answer
    posted

    Hello ,

     

    About your first question, please look at the following forum thread, where Mike Dour explained what you could do with loading of layout of UltraDockdManager.

    http://forums.infragistics.com/forums/p/41953/232517.aspx#

     

    About your second question. As far as I know  UltraDockManager does not have built in functionality  that you could use to save  the sizes of the panes in percents. But if you use XML format to save layouts, you could process the xml that UltraDockManager use to save and load its layout and change sizes of the saved panes, proportionality based on screen resolution on which you were saved the layout. To illustrate my idea I have created a sample, where I have made implementation of XMLWrapper, which is responsible to change the pane seizes in saved xml. Please run the sample and let me know if this is what you are looking for.

     

    Let me know if you have any further questions.

    WinDockManagerSaveLayout.zip
Children