My own Collection in DesignTime and Delete Action - 06-15-2005 , 02:24 PM
I try to develop my own component with a collection property
Every thing work fine in Design Time except when I try delete the component,
Each sub component contains in collection property do not destroy and so,
InitializeComponent contains each sub component !! even if the main
component was destroyed !
My collection property have
and I try to develop a ComponentDesigner with override procedure
AssociatedComponent to give the SubComponent collection but it does not work
I certainly forget something somewhere, could you help me please ?
thanks for your help !
Re: My own Collection in DesignTime and Delete Action - 06-15-2005 , 04:58 PM
You need to notify the design time environment that you have remove each of
the components inside the custom collection. So you need to ...
ITypeDescriptorContext context = (you get this context....)
// For each child component removed
context.Container.Remove(childComponent as IComponent);
// Then after all removed
Follow my startup microISV at...
"Thibaud Bouquely" <TBouquely (AT) NOSPAM (DOT) fr> wrote
Re: My own Collection in DesignTime and Delete Action - 06-15-2005 , 05:28 PM
thanks a lot for your help
I just find this article :
where the author explain It necessary to use IComponentChangeService and
your approch is different but i am not sure I understand
I already use ITypeDescriptorContext in Converter but the IDE give me an
instance of it, I never obtain it from something
(you get this context....) : How can I do this ? (with GetService method may
be on site of My component ???) and Where I must do this ? (in main
component in dispose method for example or in specific ComponentDesigner of
main component ?)
"Phil Wright" <phil.wright (AT) dotnetmagic (DOT) com> a écrit dans le message de
news:%23o2bH0ecFHA.3032 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
|Thread Tools||Search this Thread|