public AuthorPage(string name) { InitializeComponent(); NavigationPage.SetHasNavigationBar(this, true); ((NavigationPage)Application.Current.MainPage).BarBackgroundColor = Color.FromHex("#efefef"); Author authorClass = new Author(); authorClass = authorData.GetAuthorbyName(name); AuthorImage.Source = authorClass.AuthorPhoto; AuthorInfo.Text = authorClass.AuthorDescription; AuthorNAME.Text = authorClass.AuthorName; List <Model.Book> BookList = authorData.GetBooks(name); for (int i = 0; i < BookList.Count; i++) { Image bookImage = new Image { Source = BookList[i].BookPhoto }; MyStackLayout.Children.Add(bookImage); var tapGestureRecognizer = new TapGestureRecognizer(); tapGestureRecognizer.Tapped += (s, e) => { ImageTapped(bookImage.Source.ToString().Replace("Uri: ", "")); }; bookImage.GestureRecognizers.Add(tapGestureRecognizer); } }