private void New_Custom_Profile_Window(object sender, RoutedEventArgs e) { //reset all current fields and then new CustomProfile window SQLiteDataAccess.ResetAllCurrentFields(); CustomProfile win = new CustomProfile(); win.ShowDialog(); }
//open a new Profile form on + button click private void Edit_Custom_Profile_Window(object sender, RoutedEventArgs e) { //execute command before click (command sets current=1, before new window uses it) var btn = sender as Button; btn.Command.Execute(btn.CommandParameter); //new CustomProfile window CustomProfile win = new CustomProfile(); win.ShowDialog(); }