private void OnClose(object sender, RoutedEventArgs e) { //Properties.Settings.Default.Save(); this.Close(); }