I want to implement a collection property inside another (in a control
derived class) but I have some persistence problems.
There is an example of my ColumnItem class
<TypeConverter(GetType(ColumnItemConverter))> _
Public Class ColumnItem
Private m_strText As String
Private m_intWidth As Integer
Private m_imgImage As Image
Private m_colValueItems As ValueItemsCollection
Public Sub New()
'...
End Sub
Public Property Text() As String
Get
Return m_strText
End Get
Set(ByVal Value As String)
m_strText = Value
End Set
End Property
Public Property Width() As Integer
Get
Return m_intWidth
End Get
Set(ByVal Value As Integer)
m_intWidth = Value
End Set
End Property
<Editor(GetType(CollectionEditor), GetType(UITypeEditor)), _
DesignerSerializationVisibility(DesignerSerializat ionVisibility.Content)> _
Public ReadOnly Property ValueItems() As ValueItemsCollection
Get
Return m_colValueItems
End Get
End Property
'... other properties
End Class
I have a CollectionBase derived class object that contains all my
columnitems.
ValueItemsCollection is another CollectionBase derived class for my
sub-collection.
When I enter new columns in design time, nothing is serialized in the
InitializeComponent of the form.
Does anybody could send me some tips about how to do that?
Thanks