I have a custom ObjectCollection class in my custom control and a public property to access this collection.
//My custom Property
[Editor("System.Windows.Forms.Design.StringCollectionEditor",typeof(UITypeEditor))]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public ObjectCollection Items
{
get { return itemCollection; }
}
//My custom collection class
[ListBindable(false)]
public class ObjectCollection : IList, ICollection, IEnumerable
{
//code
}
However, the values are NOT getting persisted. In design mode if I save strings in StringEditor by clicking OK button, close it, and reopen it, then the strings are gone.
Any idea?