Example #1
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     DataContext = new RubikViewModel();
     viewModels.Add(new WeakReference <RubikViewModel>((RubikViewModel)DataContext));
 }
Example #2
0
 public MainWindow()
 {
     InitializeComponent();
     DataContext = new RubikViewModel();
     viewModels.Add(new WeakReference <RubikViewModel>((RubikViewModel)DataContext));
 }