I have created a sample C# project to demonstrate what I want to achieve. Here, you can check it: GiHub sample
In the example, when I press the button on MainPage, I encounter the following error in Visual Studio Community 2022 (64 bit) - Current Version 17.8.5 on Android Emulator - Pixel 5.
Java.Lang.IllegalArgumentException Message=No view found for id 0x7f080147 (com.companyname.tabbedpagetestapp:id/navigationlayout_toptabs) for fragment ViewFragment{4ddc8ef} (1c250268-2232-41b3-8c18-cb3a65799ebc id=0x7f080147)
On Windows it's a bit buggy, but works (sometimes).
Any help would be appreciated.
You can find this tip in the doc TabbedPage:
In other words,
TabbedPagecannot be used together withShell. Otherwise it will cause an error.You can also see the official sample
App.xaml.csfile, which looks like this:instead of: