bool CanRemoveCore(object viewModel) { if (viewModel == null || !viewModels.ContainsValue(viewModel)) { return(true); } ViewModelClosingEventArgs e = new ViewModelClosingEventArgs(viewModel); ViewModelClosingCommand.If(x => x.CanExecute(e)).Do(x => x.Execute(e)); ActualViewInjectionManager.RaiseViewModelClosingEvent(e); return(!e.Cancel); }
void OnStrategyViewModelClosing(object sender, ViewModelClosingEventArgs e) { ViewModelClosingCommand.If(x => x.CanExecute(e)).Do(x => x.Execute(e)); ActualViewInjectionManager.RaiseViewModelClosingEvent(e); }