I have an usercontrol that contains a toolstrip. The toolstrip is exposed through the usercontrol by a readonly property 'HostStrip' with DesignerSerializationVisibility.Content attribute. In this way we can handle the toolstrip and its contents from the usercontrol.

While using the usercontrol in an application, after adding the elements of the toolstrip, if I copy the whole usercontrol and paste it somewhere else, the elements of the toolstrip get deleted. I need to add them all over again. Why is this happening and can it be solved?

Regards!

How are you copying the control? Copying complex objects require you to do a deep copy. There is a detailed explanation here.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.