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.
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.
Thanks for your answer, Hristo.
I have passed unique Guid on DockableControlPane constructor, and all of my contents successfully loaded to the new pane. But I still get the same exception on my control when I try to show Tooltip after calling LoadFromXml. This is not happen everytime, just about 5% of the time. I will take a look of my own code then.
And thanks for the nice example. UI looks good on your example project :)