Xamarin.form Page Navigation in mvvm

前端 未结 8 1061
耶瑟儿~
耶瑟儿~ 2021-02-04 03:52

I am working on xamarin.form cross-platform application , i want to navigate from one page to another on button click. As i cannot do Navigation.PushAsync(new Page2());

8条回答
  •  走了就别回头了
    2021-02-04 04:27

    From your VM

    public Command RegisterCommand
            {
                get
                {
                    return new Command(async () =>
                    {
                        await Application.Current.MainPage.Navigation.PushAsync(new RegisterNewUser());
                    });
    
                }
            }
    

提交回复
热议问题