TreeView custom property problem

I am creating a databound treeview but i am having trouble with one property.
I created a collection to hold labels. and i added to the designer.
I can create the labels, however, i do not know how can i save it;
I do not have a problem with the string and int properties, .net saves them in the designer.cs.
PS: i am using the 2005 beta.

public class MyTreeColumns // this is my class containing the string label
public class MyTreeColumnsCollection:CollectionBase // this is my collection of labels with methods for indexing, Add, Indexof, insert, remove, and contains.

in the dataTreeView class I added:
MyTreeColumnsCollection _objects = new MyTreeColumnsCollection();

[Browsable(true)]
public MyTreeColumnsCollection TreeColumns
{
get
{
return _objects;
}
set
{
_objects = value;
}
}

what i am missing?
thank you
drey

[917 byte] By [drey] at [2008-2-1]
# 1

You need to add the following attribute to the property:


[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]

DavidM.Kean at 2007-9-8 > top of Msdn Tech,Windows Forms,Windows Forms Designer...
# 2
that's what i was missing!

thank you
drey

drey at 2007-9-8 > top of Msdn Tech,Windows Forms,Windows Forms Designer...