Exemple #1
0
        public void DoAddBookCommand(object parameter)
        {
            var myWindow = new NewBook();
            var model    = myWindow.DataContext as BookVM;

            model.Book         = null;
            model.AppVMMethods = new CommandsAppVMMethods();
            myWindow.Show();
        }
Exemple #2
0
        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();
        }