Separating pages

Hi there,

I am making a simple app and I have two sections. The first is the Log in/Sign Up page which then leads to the main part of the application. I wanted to use PageControl but with that, the user can just swipe left and skip the Log in/Sign Up page if the code is like this:

<PageControl>
	<LogInPage ux:Name="loginpage"  />
	<HomePage ux:Name="homepage"  />
</PageControl>

I have a few questions:

  1. How do I separate the parts such that, for one, the user cannot skip the Log In/Sign Up page but has to go through it for them to proceed.
  2. How do I ensure that even if the user presses back, or they swipe right from the Homepage, they won’t go back to the Log In/Sign Up?

What is the best way to go about it ?

I had tried creating a panel to hold the Log In/Sign up stuff and after their credentials are validated, I change the Opacity to 0 which reveals the Homepage that is now in a PageControl but the animations got too tricky.

What is the best way to do it ?

Thanks.

You should use a Navigator and set its DefaultPath to your log-in/sign-in page. That way users won’t be able to get past it, or swipe to any other page.

To ensure that people can’t just go back to the login page after they have logged in, you will want to use router.goto() method to get to the homepage, since it erases navigation history (as opposed to .push() which keeps it).

Hi there,

This worked perfectly. Thanks.