StrataFrame Forum

How to get VS to serialize code to designer file

http://forum.strataframe.net/Topic18608.aspx

By Greg McGuffey - 8/19/2008

I built a component (inherited from Component), then I inherited from that class, added a property and a few other things, then inherited from that class. Looks something like this:



ConcreteClass -> Inherits MiddleClass -> Inherits BaseClass -> Inherits Component



The concrete class doesn't have a designer file, I just created a class and set the inheritance. When I set a property in the property window, it serializes the code to main file (the only file). I'd like it to serialize to a designer file. How do I get VS to do this? I tried just creating a designer file myself (with file name of ConcreteClass.Designer.vb) and in the same namespace and as a partial class....no joy. What's the trick to using designer files?


By Paul Chase - 8/20/2008

Hiya Greg,

I usually start by creating a component instead of a vanilla class and then add the inherits statement that way the designer file is already plumbed, however I think all you would need to do would be to move or create your init component in the partial class and then it should serialize the values there or create a component and just copy and paste what you have does so far.

Paul

By Dustin Taylor - 8/20/2008

Yep, I'd start with a component and work backwards. Smile