private void cancelButton_Click(object sender, RoutedEventArgs e) { m_configuration.IsEditingXml = false; ConfigurationViewModel vm = this.DataContext as ConfigurationViewModel; if (vm.Cancel()) { vm.ShellViewModel.PopViewModel(m_configuration); } }
public void ClearViewModels() { if (m_viewModelStack.Count > 0 && m_viewModelStack.Peek() is ConfigurationViewModel) { ConfigurationViewModel configViewModel = m_viewModelStack.Peek() as ConfigurationViewModel; if (!configViewModel.Cancel()) { return; } } ClearModalViewModel(); m_viewModelStack.Clear(); RaisePropertyChangedEvent("SelectedViewModel"); }