Hi,
I've just finished my custom windows form designer application. I can place
different controls on my container. However, the next step is to serialize
the container. Looking in the MSDN documentation, I need to implement the
IDesignerSerializationService interface.
After searching the internet, I've found a possible solution in the #develop
project. It contains an XmlFormGenerator class. However, I've found a serious
bug in this class. When I use the GaugeContainer control from Dundas, the
method is locked into an infinite recursive loop.
Can someone give me a sample/URL on how to serialize a Control object?
Ulrich Sprick - 30 Dec 2004 20:36 GMT
Hi,
you can use a CodeDomSerializer to persist component properties in the
initialization code of the their container.
Shawn Burke has written on that topic in the MSDN documents. Search in
titles for
Customizing Code Generation in the .NET Framework Visual Designers
If i'm not wrong, you can call the InstanceDescriptor to return the
serializer for a coponent. I am quite new to designers, so i'm not really
sure...
Another interesting article has been written by Tim Dawson, Hosting Windows
Forms Designers. Although there is some conflict between him and the
SharpDevelop team, the text may provide some inside looks. The url is
http://www.divil.co.uk/net/articles/
Another thing I read in a blog somewhere: the Windows Forms designer reads
and interprets the InitializeComponent() code in order to setup the form in
design mode and initialize controls. The code cannot be just executed,
because the code is "under construction".
HTH,
ulrich
> Hi,
>
[quoted text clipped - 9 lines]
>
> Can someone give me a sample/URL on how to serialize a Control object
sakshi kaur - 04 Mar 2005 04:44 GMT
Hi,
i find myself in the same situation...
i am working on creating a FormdDesigner..and need to implement Cut Copy
paste...
Even i am working on Dundas gauge controls...
i will be highly obliged if u wuld help me in implementing this...