private void menuEdit_MouseMove(object sender, MouseEventArgs e) { if (BanCoViewModel.CanUndo()) { menuUndo.IsEnabled = true; } else { menuUndo.IsEnabled = false; } if (BanCoViewModel.CanRedo()) { menuRedo.IsEnabled = true; } else { menuRedo.IsEnabled = false; } }
private void menuEdit_MouseMove(object sender, MouseEventArgs e) { menuUndo.IsEnabled = BanCoViewModel.CanUndo(); // (true / false) menuRedo.IsEnabled = BanCoViewModel.CanRedo(); // (true / false) }