Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Design Time / September 2005

Tip: Looking for answers? Try searching our database.

Using CodeDom and IDesignerSerializationManager

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Graham Allwood - 04 Aug 2005 10:29 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.