Search code examples
c#wpfstackpanel

make new StackPanel from another StackPanel and not act as pointer


I want to make new stackpanal from another stackpanal already made before but if I changed in the new one the old one not changed . ( not act as pointer)

the old stackpanal has children so if I create new one and add children from beginning it take a lot of time .


Solution

  • This is known as cloning. See http://social.msdn.microsoft.com/Forums/hu/wpf/thread/b646c08d-9240-4bec-86f6-582901817845