Hi all,
I am creating an app which on the first screen has an image. I want to click on the image and load another view. I haven't been able to accomplish that.
var tapGestureRecognizer = new TapGestureRecognizer();
tapGestureRecognizer.Tapped += async delegate {
await this.Navigation.PushAsync(new LoginPage().GetLoginPage());
Xamarin.Forms.Device.BeginInvokeOnMainThread(null);
};
var img = new Image() {
HorizontalOptions = LayoutOptions.Center,
Source = "image.png",
};
img.GestureRecognizers.Add (tapGestureRecognizer);
Can someone please show me what I could be doing incorrectly? Thanks in advance.