Beispiel #1
0
        private void Undo_Button_Click(object sender, RoutedEventArgs e)
        {
            Button           btn = sender as Button;
            OthelloView      v   = btn.DataContext as OthelloView;
            OthelloViewModel vm  = v.FindResource("vm") as OthelloViewModel;

            vm.UndoLastMove();
        }
Beispiel #2
0
        private void UndoButton_Click(object sender, RoutedEventArgs e)
        {
            var viewModel = OthelloView.FindResource("vm") as OthelloViewModel;

            viewModel.UndoLastMove();
        }