How to derive from CodeDomDesignerLoader?

Hi all,

In a project that I'm working on we need to create an application that has the same abilities as Windows Form Designer in Visual Studio. After searching the net I found an article in MSDN Magazine issue of March 2006, called "The Perfect Host : Create And Host Custom Designers With The .NET Framework 2.0".

I downloaded the attached example and tested it, and it's basically what we need. The only thing that it is missing is the persisting of a form and its content to cs file and back.

I've read about the class CodeDomDesignerLoader and I understood that this is the class that needs to be derived and implemented to be able to persist a form to cs file and be able to read it back and generate a form.Searching the net and the documentation, I couldn't find any example how to do this.

The documentation itself is incomplete in how the class CodeDomDesignerLoader is working. Specifically, what is the relations between PerformLoad() and Parse(), and between PerformFlash() and Write(). I did find an implementation of the class in the #Develop, an open source project. But, the implementation is not clear to me and I couldn't find any documentation explaining it.

Does anyone have an example how to persist a form to cs file and back using the class CodeDomDesignerLoader?

Any help would be appreciated.

Thanks,

Dan

[2470 byte] By [DanMayer43] at [2007-12-24]