Posted 13 years ago
by Doug Beck
I'm attempting to do serialization of DocumentWindows. If users don't float any windows, it works fine. Here's what I do.
1. Get all of the windows created into a dock site.
2. Load the layout string using serializer.LoadFromString(strLayout, mMainWindow.dockSite);
However, if the user happened to float any of the windows, I get a crash that says;
"Element already has a logical parent. It must be detached from the old parent before it is attached to a new one."
I can avoid this crash if I figure out which window needs to be floated and doing the float before I do the load. However, that's not particularly easy. Is this the only way to do it?
[Modified at 01/23/2012 11:55 AM]
1. Get all of the windows created into a dock site.
2. Load the layout string using serializer.LoadFromString(strLayout, mMainWindow.dockSite);
However, if the user happened to float any of the windows, I get a crash that says;
"Element already has a logical parent. It must be detached from the old parent before it is attached to a new one."
I can avoid this crash if I figure out which window needs to be floated and doing the float before I do the load. However, that's not particularly easy. Is this the only way to do it?
[Modified at 01/23/2012 11:55 AM]