Can I mix a MAUI Shell app with Navigation?

Bryan Cass 46 Reputation points
2022-06-05T01:38:32.073+00:00

I've never written a mobile app before, so am having trouble getting started with what I want to do in .NET MAUI. This will actually be a mobile version for an existing MVC web app.

  1. First I want a splash screen (already created) with two buttons - one for new users to Sign Up (2) and one for existing users to Sign In (3) to the app. Both paths will eventually have to do some database I/O, but I'll deal with that later.
  2. For the Sign Up path, I want a Navigation stack where they will need to create a new password, verify their email address, enter their personal details, and when complete send them over to 4).
  3. The Sign In path will start here and be a simple Login screen where they enter username and password. Once complete and verified, they also go to 4).
  4. Once user is signed in, they land on a Navigation page with a bottom menu to select where to go from there (each possibly with its own modal or non-modal navigation stack as well).

So my MainPage class looks like this so far:

public partial class MainPage : ContentPage
{
 public MainPage()
 {
 InitializeComponent();
 }
    private void SignUp_Clicked(object sender, EventArgs e)
    {
        InitializeComponent();
        Application.Current.MainPage = new NavigationPage(new SignUp());
    }
    private void SignIn_Clicked(object sender, EventArgs e)
    {
        InitializeComponent();
        Application.Current.MainPage = new NavigationPage(new SignIn());
    }
}

Am I on the right track? Are there any sample MAUI apps out there yet with a workflow similar to this one that I can review and see how it's done? I'm just looking to create pages and get them linked together properly first - then business logic later.

Thanks!
Bryan

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,859 questions
0 comments No comments
{count} vote

Accepted answer
  1. Kay 76 Reputation points
    2022-06-05T09:40:05.31+00:00

    The .NET MAUI platform provides two primary forms of page navigation to an app:

    • Shell.
    • Base navigation pages, such as FlyoutPage, TabbedPage, and NavigationPage.

    In this blog, let’s see how we can integrate page navigation in your .NET MAUI application with code examples.

    Source: Selva Ganapathy Kathiresan, May 27, 2022


0 additional answers

Sort by: Most helpful