Another custom property question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have added a property of custom class type to a control. I can see and set
the property at design time, but nothing is saved.
I have added many other properties of defined types like string, boolean,
etc. And these all work fine.

Here is a sample of my property code...

<Category( "MyProperty" ) > _
Public Property DumbProperty( ) as MyCollection
Get
return some_MyCollection_Object
End Get
Set (ByVal Value as MyCollection )
some_MyCollection_Object = Value
End Set
End Property


What am I missing here? Any ideas or suggestions would be appreciated.
 
I think you need to add DesignerSerializationVisibility attribute, with the
value Visible.

This is because, this is a collection, and needs to be serialized
differently. The designer needs to generate something like:

myObject.DumpProperty.Add(new MyItem())
 
Thank you for your replies...
I think that will get me going in the right direction.

Thanks
 
Back
Top