PushAsync is not supported globally on Android, please use a NavigationPage - Xamarin.Forms

前端 未结 9 1468
情歌与酒
情歌与酒 2020-12-12 17:34

I have the following method in an Xamarin.Forms.ContentPage wired to a button click event

public class Lo         


        
9条回答
  •  一整个雨季
    2020-12-12 18:29

    You need to enclose your LoginPage in a NavigationPage. This will fix your error, but will leave you with the LoginPage contained on your navigation stack.

    An alternate approach would be to make your HomePage the root of the application, then display the LoginPage modally on top of it. Only when the user successfully logs in do you dismiss the LoginPage modal so they can see the HomePage.

提交回复
热议问题