/// <summary> /// Method to invoke when the Edit command is executed. /// </summary> private async void OnEditExecute() { var viewModel = new PersonViewModel(SelectedPerson); await _uiVisualizerService.ShowDialog(viewModel); }
/// <summary> /// Method to invoke when the Add command is executed. /// </summary> private async void OnAddExecute() { var viewModel = new PersonViewModel(new Person()); if (await _uiVisualizerService.ShowDialog(viewModel) ?? false) { PersonCollection.Add(viewModel.Person); } }
/// <summary> /// Method to invoke when the Edit command is executed. /// </summary> private async void OnEditExecute() { var viewModel = new PersonViewModel(SelectedPerson); await _uiVisualizerService.ShowDialog(viewModel); }