Another custom property question

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.
 
M

Marina

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())
 
G

Guest

Thank you for your replies...
I think that will get me going in the right direction.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top