How to get VS to serialize code to designer file


Author
Message
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
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?



Paul Chase
Paul Chase
Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
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

Dustin Taylor
Dustin Taylor
StrataFrame Team Member (652 reputation)
Group: StrataFrame Users
Posts: 364, Visits: 771
Yep, I'd start with a component and work backwards. Smile
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search