Why does the Shell lose its styling when I navigate from a modal page?

EasyGoingPat 261 Reputation points
2021-09-06T11:37:54.857+00:00

130047-shell-example-code.txt129651-image-1.png129569-image-2.png129570-image-3.png129604-image-4.pngI have an application that has a requirement that I would have thought straightforward for the new Shell but is causing no end of problems.

I have some 'top-level' pages that can be freely navigated between using a TabBar.

One of these top-level pages, has a chain of children that are not part of the TabBar. This chain is terminated by one or more screens that are required to be modal. From these modal screens, I wish to be able to jump right back to the home screen.

I have got all of this working now but when I jump back to the home screen from a modal screen, the Shell loses its styling. Note also that the flyout hamburger appears even though I am using a TabBar for top-level navigation.

The first attached image shows the layout of the navigation.

The following attached images show:

  1. The home screen when the application starts up.
  2. The first NON-MODAL child screen. (Going back to the home screen from here displays fine.)
  3. The second MODAL child screen.
  4. The home screen once I have navigated back to it from the modal screen.

The code is shown below. (THE WEBSITE BREAKS WHEN I TRY TO ADD THE CODE. I WILL KEEP TRYING.)

Can anyone explain what I am doing wrong here and how to fix it?

Kind wishes - Patrick

129622-navigation-requirements.png

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,312 questions
{count} votes