Cloning WPF controls and object hierarchies
问题 I have some problems cloning an object hierarchie. It's a toolkit for modelling applications, the toolbox contains class instances as prototypes. But I'm having a hard time cloning these :) The following code shows the problem: public abstract class Shape { protected List<UIElement> elements; private Canvas canvas; ... public Canvas getCanvas() { ... }; } public class MovableShape : Shape { protected ... propertyA; private ... propertyXY; ... } public abstract class AbstractLayout :