Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Problem opening new Page

$
0
0

I'm developing a several page application using Xamarin Forms, and I have a problem while opening a new Page.

For this, I'm using:

    async void Check(object sender, EventArgs args){
    await this.Navigation.PushAsync (new MenuPage ());
    }

Where MenuPage is a ContentPage

This opens as expected, but the problem comes where I'm trying to open another page with the same code:

async void OpenResult(object sender, EventArgs args)
{
await this.Navigation.PushAsync(ResultPage());
}

Where the resultPage is a Contentpage too.

The error I'm getting is:
System.InvalidOperationException: PushAsync is not supported globally on Android, please use a NavigationPage.

Why am I getting an error in the second method, and not in the first?
And, how could I use a navigation Page to solve?

Thanks


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>