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

前端 未结 9 1473
情歌与酒
情歌与酒 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:18

    I only change pushAsync with pushModalAsync :)

    public async void LogIn(object sender, EventArgs eventsArgs)
    {
        //do authenticate stuff here
        SSO.MyAuthentication client = new SSO.MyAuthentication();
    
        bool isAuthenticated = client.Authenticate(_UsernameInput.Text, _PasswordInput.Text);
    
        if(isAuthenticated)
        {
             //Push home page to top of navigation stack
             //Navigation.PushAsync(new HomePage());
               Navigation.PushModalAsync(new HomePage());
        }
    }
    

提交回复
热议问题