A
alex sparsky
I have a custom collection in my c# winform ui control called Items.
Items is a built in collection type that does not allow itself to be
replace (you can't 'set' the itemscollection in the control).
However, the contents of the Items collection is persisted through
designtime.
Currently this all works except for the following. When you bring up
the custom collection editor and add new items then close the
collection editor.
I add the items to the base control in the editvalue after success by
getting a reference to the control, clearing the items collection,
then re-adding all the items.
This all works except for one catch, it never thinks the collection
has changed. Since there is no 'Set' accessor on the collection in
the base control, for some reason the design time refuses to believe
it is changable even though it's been edited.
Now if I resize the control or change some other property, it puts the
little star on the forms name and when you save it properly serializes
the items collection.
So I need to know if there is a way in editvalue to force the designer
to know that the items collection is dirty (hence putting up the
little star in the name) so they can save and have it serialize out.
Items is a built in collection type that does not allow itself to be
replace (you can't 'set' the itemscollection in the control).
However, the contents of the Items collection is persisted through
designtime.
Currently this all works except for the following. When you bring up
the custom collection editor and add new items then close the
collection editor.
I add the items to the base control in the editvalue after success by
getting a reference to the control, clearing the items collection,
then re-adding all the items.
This all works except for one catch, it never thinks the collection
has changed. Since there is no 'Set' accessor on the collection in
the base control, for some reason the design time refuses to believe
it is changable even though it's been edited.
Now if I resize the control or change some other property, it puts the
little star on the forms name and when you save it properly serializes
the items collection.
So I need to know if there is a way in editvalue to force the designer
to know that the items collection is dirty (hence putting up the
little star in the name) so they can save and have it serialize out.