private void ShowImages(CarViewModel carView) { photoGalleryContainer.Children.Clear(); if (carView.Images.Count > 0) { foreach (string imagePath in carView.Images) { photoGalleryContainer.Children.Add(new Image() { Source = imagePath }); } } else { photoGalleryContainer.Children.Add(new Label() { Text = "No hay imágenes disponibles", HorizontalOptions = LayoutOptions.CenterAndExpand, VerticalOptions = LayoutOptions.CenterAndExpand }); } }
private void RentButton_Clicked(object sender, EventArgs e) { CarViewModel selectedItem = carModelPicker.SelectedItem as CarViewModel; Navigation.PushAsync(new RentCarPage(selectedItem)); }