I'm trying to implement saving/loading of layout via UltraDockManager SaveAsXML/LoadFromXML combo and it hangs on loading. I put together a simple application that has a simple listbox with a number of choices. I can open and dock multiple WebBrowsers (using different keys for the DockableControlPane) but when I call ultraDockManager1.LoadFromXML function it always hangs when I have more than 1 WebBrowser docked. It is the same with any control - i use WebBrowser just as an example.
Picture below show ultraDockManager going insane and hanging after LoadFromXML call.
This is the function I use to add controls
void addCtrlToDockManager(String sKey, Control control) { int index = 1; String sUseKey = sKey; while (ultraDockManager1.PaneFromKey(sUseKey) != null) { sUseKey = sKey + "_" + index++; } DockableControlPane dcp = new DockableControlPane(sUseKey, sUseKey, control); DockAreaPane dap = new DockAreaPane(DockedLocation.Floating); dap.Panes.Add(dcp); ultraDockManager1.DockAreas.Add(dap); dap.Float(false, new Rectangle(100, 100, 400, 400)); }
I hope I'm just doing something silly - please help.
Lev said:Name property of each control must be set to unique values as well
I think i found the answer to my own question - it was not enough to set key of the DockableControlPane to unique value. Name property of each control must be set to unique values as well - otherwise ultraDockManager just goes into some crazy infinite loop. Just adding control.Name = sUseKey; in the code above seems to fix the problem.
Still would like to hear from infragistics people if the code above is the way to do this.