Maui AppShell - Navigate on Open

1.8k Views Asked by At

I'm having some conceptual issues with the Maui AppShell. When I start my application, I want to present my users with

  1. The login page if they're not authenticated.
  2. The onboarding page if they're authenticated, but haven't filled in basic info.
  3. Otherwise, the main view

But the AppShell seems pretty static:

<Shell x:Class="ThetaRex.OpenBook.Demo.AppShell"
       Shell.FlyoutBehavior="Disabled"
       xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
       xmlns="http://schemas.microsoft.com/dotnet/2021/maui">
    <ShellContent ContentTemplate="{DataTemplate MainView}"/>
</Shell>

How does one use the AppShell to programmatically navigate to a page when the application starts?

0

There are 0 best solutions below