![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello 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 ! NB : My collection property have DesignerSerializationVisibility(DesignerSerializat ionVisibility.Content) attribut 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 ! |
#3
| |||
| |||
|
|
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 context.OnComponentChanged() Phil Wright Follow my startup microISV at... http://componentfactory.blogspot.com "Thibaud Bouquely" <TBouquely (AT) NOSPAM (DOT) fr> wrote in message news:ORxmaddcFHA.3492 (AT) TK2MSFTNGP14 (DOT) phx.gbl... Hello 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 ! NB : My collection property have DesignerSerializationVisibility(DesignerSerializat ionVisibility.Content) attribut 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 ! |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |