Search code examples
.netwindowsmobilemaui

Shell.TitleView is covering up my NavigationPage tabs in .Net Maui


So for a Client we have a set of buttons up top set in the appshell.xml:

 <Shell.TitleView>

     <Grid ColumnDefinitions="*, Auto">
         <HorizontalStackLayout Grid.Column="1">
             <Button Text="User Info"
         FontSize="Micro"
         VerticalOptions="Center"
         ImageSource="icon_user.png"
         MaximumHeightRequest="75"
         ContentLayout= "left,1"
         Clicked="User_Info_Button_Clicked"
 />
             <Button Text="In-Progress"
         FontSize="Micro"
         VerticalOptions="Center"
         ImageSource="icon_view_in_progress_pso.png"
         MaximumHeightRequest="75"
         ContentLayout= "left,1"
         Clicked="InProgressPSO_Button_Clicked"
 />
             <Button Text="User Settings"
         FontSize="Micro"
         VerticalOptions="Center"
         ImageSource="icon_settings.png"
         MaximumHeightRequest="75"
         ContentLayout= "left,1"
         Clicked="Settings_Button_Clicked"
         />
             <Button Text="Logout"
         FontSize="Micro"
         VerticalOptions="Center"
         ImageSource="logout.png"
         MaximumHeightRequest="75"
         ContentLayout= "left,1"
         Clicked="Logout_Button_Clicked"
 />

         </HorizontalStackLayout>
     </Grid>
 </Shell.TitleView>
 <ShellContent x:Name="ShellWindow"/>

Looks like this: A tab on my tabbedpage with buttons

That is also in connection with my Tabbed with two pages: Log Page and a reporting page

whenever I use Shell.Current.GotoAsync(nameof(Pagetogoto)) we navigate away from the Navigation page and then use EITHER: Shell.Current.GoToAsync(nameof(MainPage))OR Shell.Current.GoToAsync($"../nameof(MainPage)) The buttons in my AppShell are covering my tabs on MainPage.

There is also the issue that whenever I navigate, more instances of MainPage are pushed onto the Navigation Stack. How can I maintain this?


Solution

  • The issue is that shell and tabbed pages dont get along well. We opted out of using the APPShell and I've put my toolbar in NavigationPage.TitleView