Win form runtime control generation and event handling

How can save the windows form with controls (properties and code) in xml, read and write that xml appropriately and regenerate the form at run time?
salmanfazalAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
_Katka_Connect With a Mentor Commented:
Hi, you can use IXmlSerializable for your own controls, but if you want to write whole form to a XML you'll need a ISerializationSurrogate. To perform the serialization yourself. It allows you to serialize the object that don't have this capability, but it's a huge task to perform on an arbitrary form.

There's a good article on surrogate serialization:

http://www.codeproject.com/KB/cs/generic_deep_cloning.aspx?display=Print

Basically you'll have to serialize the form yourself. Lots of reflection, and trial & error.

regards,
Kate
0
 
salmanfazalAuthor Commented:
thnx
0
All Courses

From novice to tech pro — start learning today.