all groups > dotnet windows forms designtime > april 2004 >
You're in the

dotnet windows forms designtime

group:

Custom collection changing


Custom collection changing Phil Wright
4/23/2004 2:15:25 PM
dotnet windows forms designtime:
I have created a custom collection and added it to my user control.

If I let the generic collection editor be used to edit the contents then it
works just fine and any newly created entries are persisted into code. But I
want to create my own collection editor and have used the UITypeEditor
attribute so that mine gets called as a modal dialog. This works fine in
that I can press the '...' button for the collection and my dialog appears
and does into modify the collection contents.

But .... the newly added entries are not persisted into code whereas using
the generic collection editor does. Should I be called some designer related
service/method to notify the designer that the contents have been changed?

Phil.

Re: Custom collection changing Paul
5/13/2004 10:20:19 AM
Hi Phil!

It's possible you did not add attribute for collection.
Look at the example:

[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public CommandBarItemCollection Items
{
get { return this.items; }
}

[quoted text, click to view]

AddThis Social Bookmark Button