public CarPrimitive SelectCar(IModalDialogService modalDialogService, IServiceFactory serviceFactory) { var viewModel = new ManageCarsViewModel(modalDialogService, serviceFactory); viewModel.DialogMode = DialogMode.Chose; ModalDialogHelper<ManageCars>.ShowDialog(viewModel); if (!viewModel.IsCanceled) { return viewModel.SelectableCar.SelectedItem; } return null; }
public void ManageCars(IModalDialogService modalDialogService, IServiceFactory serviceFactory) { var viewModel = new ManageCarsViewModel(modalDialogService, serviceFactory); viewModel.DialogMode = DialogMode.Manage; ModalDialogHelper<ManageCars>.ShowDialog(viewModel); }