public TeamsPage() { InitializeComponent(); var tapGestureRecognizer = new TapGestureRecognizer(); tapGestureRecognizer.Tapped += async(sender, e) => { // cast to an image Image theImage = (Image)sender; Xamarin.Forms.FileImageSource objFileImageSource = (Xamarin.Forms.FileImageSource)theImage.Source; Navigation.PushAsync(await SquadPage.generateSquadPage(objFileImageSource.File)); Tunisia.Text = objFileImageSource.File; // now you have a reference to the image }; tn.GestureRecognizers.Add(tapGestureRecognizer); }
public static Task <SquadPage> generateSquadPage(string file) { var ret = new SquadPage(file); return(ret.CreateSquadPage(file)); }