Hello,
I would like to add a new item to a collection at Design Time without
going through a collection editor. I am trying to add an item to a
collection from from DesignerVerb handler.
I have DesigntimeSerializationVisibility set to "Content" on the
Collection property, but I am a little confused about how to "create"
the new object to add. For instance, to add it to the collection, at
some point I would call:
m_oCollection.Add(myNewItem);
But I don't quite understand how to obtain myNewItem. It seems like it
must have to be given a Site some how and a Site.Name... I am not
quite sure how to do this. Please tell me that I am not going to have
to Serialize the code manually... :)
TIA
joeycalisay - 12 May 2005 09:18 GMT
if your collection is a collection of components (designable), the said item
should be created through the designer host, i.e.:
IDesignerHost.CreateComponent method

Signature
Joey Calisay
http://spaces.msn.com/members/joeycalisay/
> Hello,
>
[quoted text clipped - 15 lines]
>
> TIA