Update MainWindow.xaml.cs

removed extraneous function