예제 #1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            ISPVIewModel model = DataContext as ISPVIewModel;

            //Bad because no logic should be made in a view. Not even a clone
            // If you uncomment it's not gonna compile it is missing something.
            //model.AllServices.Add(model.ActualService.Clone());

            model.CloneTheActualIntoAll();
        }
예제 #2
0
 public MainWindow(ISPVIewModel model) : this()
 {
     DataContext = null;
     DataContext = model;
 }