views:

3

answers:

0

I have a Visual Studio designer enabled control which uses a collection editor to allow the user to create and edit sub components.

For example, I have a control which offers a readonly "List" property containing a collection of bindings (themselves components with a name property and an event). The user can modify this list of bindings at will and everything works pretty well. They can create and remove bindings without a glitch.

However, when they copy the control, the designer does not copy the binding, it still refers to the original binding components. Also, when they delete the control, it doesn't delete the bindings. It is as if the form has the ownership of these bindings, not the control.

I'm sure there is an attribute to use or some interface to implement, maybe even a custom editor trick to use, but googling for it has left me "feeling unlucky".

Thanks for any help you may have! :)