Hi,
I have been attempting to serialize a form to Xml using .NET 2.0. I have
successfully created my custom forms designer and I have implemented a
DesignerLoader (derived from BasicDesignerLoader). However, when it came to
serializing a form that contained a TableLayouyPanel I found that I had
moved in to a whole new set of problems, i.e. when deserializing the xml
(instantiate the class from the xml) I found I needed the row and column
position of the tables child controls. Something which I could seem to find
easily from my serialized xml.
Because of all this I though I would use the CodeDom instead. After all, I
only need to persist the description of a form and be able to instantiate it
a run time. I decided to use the CodeDom as all the windows forms controls
seem to have a DesignerSerializer that should provide me with the correct
information.
So, finally, the question I have is quite simple: Am I best deriving from
the CodeDomDesignerLoader and does anyone know how to use / derive from this
class, i.e. how to implement the abstract methods?
Kind regards
Graham
Graham Allwood - 04 Aug 2005 21:33 GMT
Well, I have got a little further now. It seems quite easy to derive from
the CodeDomDesignerSerializer as there are only about 4 methods that need to
be overridden. Having said that it still isn't working. The problem I have
is that one of the methods of this class, Parse(), needs to return a
CodeCompileUnit of the class to design. However, no matter what I do I can't
seem to get a simple CodeCompileUnit together that represents a very simple
form derived class.
Graham
> Hi,
>
[quoted text clipped - 20 lines]
>
> Graham
David Whitchurch-Bennett - 20 Sep 2005 10:52 GMT
Hi Graham,
Would you mind helping me, by explaining how you even got this far. I would
like to be able to save the layout of a design surface, and load it later. I
don't really care on the format! How did you link the BasicDesignerLoader to
the design surface, and how does it perform the flush etc?
Thanks,
David.
> Hi,
>
[quoted text clipped - 20 lines]
>
> Graham