Update MainWindow.xaml.cs

bug fix!
Merge pull request #29 from tkojdecki/patch-6

Update MainWindow.xaml.cs