How should I use the rootpage correctly so I can navigate/pushasync to other pages with the correct navigatiobar.
Right now It looks like this:
MainPage = new RootPage ();
And my rootpage:
public RootPage ()
{
var theMenu = new MenuPage (this);
theMenu.Title = "::";
Master = theMenu;
NavigationPage page = new NavigationPage(new StartPage ());
Detail = page;
}
If i have it like this, i get an error when I try to navigate to a new page:
async void contactClick (object s, EventArgs e)
{
await Navigation.PushAsync (new ContactPage());
}
Error: "PushAsync is not supported globally on iOS, please use a NavigationPage."
If i instead do :
MainPage = new NavigationPage (new RootPage ());
I get two navigationbars. I solved it by using...:
NavigationPage.SetHasNavigationBar (this, false);
...on my RootPage but that gives it a weird animation when I navigate to new pages and also it crashes on android. Any ideas how you would solve this?