Based on the discussion in the comments: you solve your problem in the wrong way. To implement undo / redo functionality, which you actually want to do in this way, you do not need to clone objects, much less UI objects.
For a start, why is there a problem with UI objects. For an arbitrary object, you do not know that there is a real property of this object (that is, a sub-object belonging to it), and that only a reference to another object. As a result, you have to clone all the properties. For example, Parent , Tag and DataContext .
Further, the properties of the object can be stored in unexpected places. For example, attached properties are stored in a place that is not accessible for reflection, having only a copy of the object, and not knowing anything else.
Since the root element is available through Parent / Children , and then all elements, you will have to clone the entire window. Since a VM is accessible through the DataContext , at the same time you will have to intercept it as well. And since the VM has links to the model, you will thus take the entire application with you . Including, by the way, the field in which the change history is stored.
Then, there is a set of objects that are not fundamentally cloned. Open file? Socket? Locked Monitor (aka lock )? Thrown exception? Any singleton from your program? Type ? Delegate? They all do not bend over.
What is really needed ? It is necessary to represent the state of the program or its parts using VM and model objects. If you want to save them, it makes sense to make these objects immutable, so that there is no risk that their state will change after you have saved a copy. (Understand immutable objects, they are easy to write so that when you change pieces, the source object is reused. If all pieces are immutable, they can be used anywhere without the need for cloning in the same way.)
Next, your View must strictly follow the MVVM pattern, and display the state of the VM, without ad-libbing and installing important pieces in the code behind. In this case, the state of your View will be completely determined by the state of the VM, which means that the need to remember the View will disappear.
At the same time, the only objects that you have to memorize (not clone, but memorize!) Is the current state.
ICloneable? - VladD