void MainWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e) { Mp3Player.Exit(); trayIcon.Dispose(); SongViewModel.Save(); Global.AppSettings["ActivePage"] = Page.ToString(); Global.AppSettings["WindowPos"] = new Rect(Left, Top, ActualWidth, ActualHeight).ToString(); Global.SaveSettings(); }