Hello,
It possible to create new app shell and move to main page through this new app shell?
Yes, you can use following code change MainPage to AppShell();
App.Current.MainPage=new AppShell();
For example, you judge the user if it is logining. If yes, open the AppShell, if not, open the loginpage.
public App()
{
InitializeComponent();
if (isLogin)
{
MainPage = new AppShell();
}
else
{
MainPage = new LoginPage();
}
}
After login, you need to open the AppShell, for example, you can do this in the button click event.
private void Button_Clicked(object sender, EventArgs e)
{
App.Current.MainPage=new AppShell();
}
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.