I'd like to be able to save and restore the state of my DocHost. The content of each DocumentWindow is custom content which is loaded from another file. During the serialization I'm handling ObjectSerialized and am able to add my own tag data when the DocumentWindow is being serialized. In my case the tag is a GUID that I can look up in my database to load the window content.
That's all working fine - the issue is with the deserialization. I'm handling ObjectDeserialized which is getting fired but I'm not exactly sure what to do at this point. ObjectDeserialized gets called multiple times but when e.Node.Tag is my GUID e.Node is an XmlDocumentWindowRef and e.Item is a DockingTrack. At this point, armed with my GUID I can create my content for the DocumentWindow - what do I do with it? Do I need to create a DocumentWindow? Somehow turn in the XmlDocumentWindowRef for an actual DocumentWindow?
That's all working fine - the issue is with the deserialization. I'm handling ObjectDeserialized which is getting fired but I'm not exactly sure what to do at this point. ObjectDeserialized gets called multiple times but when e.Node.Tag is my GUID e.Node is an XmlDocumentWindowRef and e.Item is a DockingTrack. At this point, armed with my GUID I can create my content for the DocumentWindow - what do I do with it? Do I need to create a DocumentWindow? Somehow turn in the XmlDocumentWindowRef for an actual DocumentWindow?