Hello @Eduardo Gomez ,
Welcome to our Microsoft Q&A platform!
Please don't use the following way to set the MainPage. The Application.Current.MainPage
is the code to get and set the root page. In the first line, the Application.Current.MainPage
is on the right side which means to get the current MainPage. The app actually is the login page, you could add a breakpoint to check that.
Page app = Application.Current.MainPage; // app is login page
app = new NavigationPage(new NotebooksPage());
To set the root page, please place the code on the left of the equal sign.
Application.Current.MainPage = new NavigationPage(new NotebooksPage());
Best Regards,
Jarvan Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
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.