Can I have a Xamarin Shell redirect to a second Shell

Mark Rooney 21 Reputation points

I am building an application that has several layers of menus. I would like to leverage the shell paradigm to accomplish this. How can I have a shell call another shell?

At my App.Shell I have the following:
<FontImageSource FontFamily="FontAwesome6ProLight300" Color="Black" Glyph=""/>
<ShellContent Route="ExplorerMenu" ContentTemplate="{DataTemplate local:ExplorerMenu}"/>
Which would call a second menu (Explorer). I've resgistered the second menu in my route, but I get the following error:

Error XFC0000 Cannot resolve type "ExplorerMenu".

Any help would be appreciated in how to load a second shell menu.

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

1 answer

Sort by: Most helpful
  1. Cole Xia (Shanghai Wicresoft Co,.Ltd.) 6,751 Reputation points


    Welcome to Microsoft Q&A!

    I suggest you create two class for different shell , and switch the App.Current.MainPage when redirecting .

       App.Current.MainPage = new NewShell();  

    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments