Completed
Last Updated: 31 Mar 2014 09:09 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 02 Dec 2013 06:31
Category: Dock
Type: Bug Report
0
FIX. RadDock - ObjectDisposedException when loading layout
To reproduce: - add RadDock without document windows and five RadButtons with the following Click event handlers: private void radButton1_Click(object sender, EventArgs e) { this.radDock1.LoadFromXml(@"..\\..\\..\\layout1.xml"); } private void radButton2_Click(object sender, EventArgs e) { this.radDock1.LoadFromXml(@"..\\..\\..\\layout2.xml"); } //"Add" button private void radButton3_Click(object sender, EventArgs e) { this.documentContainer1.DockManager.AddDocument(new DocumentWindow(DateTime.Now.TimeOfDay.ToString())); } //Save layout 1 private void radButton4_Click(object sender, EventArgs e) { //add four document windows and save the layout 1 this.radDock1.SaveToXml(@"..\\..\\..\\layout1.xml"); } //Save layout 2 private void radButton5_Click(object sender, EventArgs e) { //add three document windows and save the layout 2 this.radDock1.SaveToXml(@"..\\..\\..\\layout2.xml"); } 
First add four document windows (via "Add" button click) and save layout 1 (via "Save layout 1" button click) on the RadDock and it creates 4 new Documents and save them in the xml. 
Restart the application and add three document windows (via "Add" button click) and save layout 2 (via "Save layout 2" button click). Load layout 1 (four document windows), then load layout 2. 
Everything is OK. But now load again layout 1. As a result ObjectDisposedException is thrown.

Workaround: before loading the xml, remove all document windows: radDock1.RemoveAllDocumentWindows(); radDock1.LoadFromXml(@"..\\..\\..\\layout1.xml");
0 comments