.Net MAUI MainPage on ShellContent appears in every page

89 Views Asked by At

I have my MainPage defined in the shellContent this way: `

    <Shell
        x:Class="AuPairFind.AppShell"
        xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
        xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
        xmlns:local="clr-namespace:AuPairFind"
        Shell.FlyoutBehavior="Disabled"
        xmlns:view="clr-namespace:AuPairFind.View">
        <ShellContent
            Shell.NavBarIsVisible="false"
            ContentTemplate="{DataTemplate view:MainPage}"
            Route="MainPage" />
    </Shell>

The problem is when i do the routing to another page the MainPage continues on the new page just like in the image below:

MainPage ghost appearing

How can i stop the MainPage from showing in every page?

I've tried changing the shellContent page and the problem persists

Solved: Using verticalStackLayout with ignoreSafeArea="True" solved my problem

0

There are 0 best solutions below