コード例 #1
0
 void EditExecute()
 {
     EditStudentWindow window = new EditStudentWindow();
     Student editItem = new Student();
     editItem.CloneFrom(this.SelectedItem);
     EditStudentWindowViewModel vm = new EditStudentWindowViewModel(editItem, window);
     window.DataContext = vm;
     window.ShowDialog();
     OnEditComplete(vm);
 }
コード例 #2
0
 void AddExecute()
 {
     EditStudentWindow window = new EditStudentWindow();
     EditStudentWindowViewModel vm = new EditStudentWindowViewModel(null, window);
     window.DataContext = vm;
     window.ShowDialog();
     OnEditComplete(vm);
 }