RonMexico
Member
The backgound is that I'm developing a vb.net component. This component has a prperty that uses the systems collection editor. Then that collection has a property that has a collection. The problem is that the first collection seems to work fine but the second collection will lose data when the solution is built or .net is restarted. It does not lose anything on a rebuild. The Windows Form Designer Generated Code seems to not have the commands to add the collection. So my main question is:
How can you write code in a class to instruct it to write additional code in a forms Windows Form Designer Generated Code?
I think that it has something to do with serialization but I can't seem to get it to work right. The part that does work looks something like this:
<DesignerSerializationVisiblity(DesignerSerilizationVisiblity.Visible)>_
Public Property CommandName() as string
Get
Return _CommandParamName
End Get
Set(Byval value as string)
_CommandParamName = Value
End set
End Property
I use similar code on the nested collection and it doesn't work.
Also when I delete an item from a collection it doesn't delete the system generated code. Any ideas there?
How can you write code in a class to instruct it to write additional code in a forms Windows Form Designer Generated Code?
I think that it has something to do with serialization but I can't seem to get it to work right. The part that does work looks something like this:
<DesignerSerializationVisiblity(DesignerSerilizationVisiblity.Visible)>_
Public Property CommandName() as string
Get
Return _CommandParamName
End Get
Set(Byval value as string)
_CommandParamName = Value
End set
End Property
I use similar code on the nested collection and it doesn't work.
Also when I delete an item from a collection it doesn't delete the system generated code. Any ideas there?