public void ExecuteAddChoiceCommand() { var vm = Container.Resolve <StringDialogViewModel>(); vm.Add(true, "Add Choice", "Choice:"); if (DialogService.ShowDialog(vm)) { var newItem = StringViewModel.CreateFromString(Container, vm.Value); if (Choices == null) { _choicesSource = new ObservableCollection <StringViewModel>(); Choices = new ListCollectionView(_choicesSource); } _choicesSource.Add(newItem); // ReSharper disable once PossibleNullReferenceException Choices.MoveCurrentTo(newItem); _choicesChanged = true; OkCommand.RaiseCanExecuteChanged(); } }