Update MainWindow.xaml.cs

Made deepCopy generic