TabControl Deep Copy
I need to make a deep copy of a tabcontrol.
The large picture is this: I have a project which has a 300 line xaml code
tabcontrol with 8 tabs in it which are pretty big. I also have a treeview
with different items.
When an item in that list is selected it shows the tabcontrol associated
with it. The problem now comes that when I add an element I want to make a
deep copy of the original tabcontrol and associate that new one to the new
element (of course I'm going to erase the content in the new one). Shallow
copies won't work because they are pointing to the same location in
memory, so "=",IClonable are a no go. And the frustrating part is that i
can't use deep copy with serialization because the tabcontrol is not
serializable. And I can't(or should say won't) make a custom tabcontrol
which is serializable because the tabcontrol is 300 line in xaml and it
would be 600 line in code so it's a waste of space and time.
I've searched for this for 2 days and didn't find anything. There is no
need for me to show the code because I'm looking for a general purpose
Deep Copy method that can copy any type of a tabcontrol.