Updated MainWindow.xaml.cs