Winforms Designer: When I copy\paste my custom control, need clone instead of pointer

666 Views Asked by At

I have a control called "MyControl", which has an object associated with it named "SettingsObject" which is an object that contains about 15-20 properties.

I'm running into an issue where when I copy\paste my control using the visual studio designer, it doesn't copy "SettingsObject" (I'm using ICloneable, or attempt to use any constructors to create a new object), it just uses a pointer to the object in the first control.

How can I copy my "SettingsObject" on a copy, instead of just point to the original.

Thanks!

1

There are 1 best solutions below

0
On

I can only guess that what you're looking for is a custom designer for your own-made control.
Have a look at the MSDN article regarding this.
You can also check out this question which was answered nicely by Jeff Yates.

Good luck!