public void DoAddBookCommand(object parameter) { var myWindow = new NewBook(); var model = myWindow.DataContext as BookVM; model.Book = null; model.AppVMMethods = new CommandsAppVMMethods(); myWindow.Show(); }
public void DoChangeCommand(object parameter) { Book selectedBook = parameter as Book; var myWindow = new NewBook(); var model = myWindow.DataContext as BookVM; model.Book = selectedBook; model.AppVMMethods = new CommandsAppVMMethods(); myWindow.Show(); }