//View the Selected Vehicle private void ViewSelected(object obj) { if (RequestProcessingList != null) { var vehicleModel = RequestProcessingList.FirstOrDefault(); var home = new HomeWindowVM(); var vehicleLocator = new VehicleLocatorVM(); var vehicleDetails = new VehicleDetail(); var window = new Window() { Content = vehicleDetails }; window.DataContext = vehicleLocator.VehicalDetailsViewModel; vehicleLocator.Vin = vehicleModel.Vin; vehicleLocator.VehicleId = vehicleModel.VehiclesID; vehicleLocator.CustomerID = vehicleModel.CustomerID; vehicleLocator.CreatedBy = vehicleModel.CreatedBy; vehicleLocator.SelectedItems = new ObservableCollection <object>() { vehicleLocator }; var list = new List <VehicleLocatorVM>() { vehicleLocator }; DelegateEventVehicle.SetValueListMethod(list); DelegateEventVehicle.SetValueMethodTabEnable(false); DelegateEventVehicle.SetValueMethodCmd("Edit"); window.Show(); } }
public VehicleInfoViewModel(VehicleLocatorVM vehicleLocatorViewModel, ICollection <VehicleInfoViewModel> parentCollection) { if (vehicleLocatorViewModel == null) { throw new ArgumentNullException("vehicleLocatorViewModel"); } if (parentCollection == null) { throw new ArgumentNullException("parentCollection"); } VehicleLocatorViewModel = vehicleLocatorViewModel; _parentCollection = parentCollection; }