private async void LvCinema_ItemTapped(object sender, ItemTappedEventArgs e) { var cinema = ((ListView)sender).SelectedItem as Model.Cinema; var dbConnection = DependencyService.Get <ISQLiteDatabase>().CreateConnection(); var listImage = dbConnection.Query <Model.ImageCinema>("SELECT * FROM ImageCinema WHERE id_cinema = ?", new object[1] { cinema.ID }); Model.CinemaInfo cinemaInfo = new Model.CinemaInfo() { ID = cinema.ID, Name = cinema.Name, Address = cinema.Address, Phone = cinema.Phone, X = cinema.X, Y = cinema.Y, Images = new ObservableCollection <Model.ImageCinema>(listImage) }; await Navigation.PushAsync(new CinemaInfoPage(cinemaInfo)); ((ListView)sender).SelectedItem = null; }
public CinemaInfoPage(Model.CinemaInfo cinemaInfo) { InitializeComponent(); this.cinemaInfo = cinemaInfo; BindingContext = this.cinemaInfo; }