我是一个Xamarin Forms Prism应用程序,我有3个选项卡,并且选项卡栏仅在特定页面上处于活动状态,如果我在某个特定选项卡中深入导航,则底部选项卡将消失。有没有一种方法可以在我们导航到这些选项卡中的其他页面时保持底部选项卡的活动状态?
  
  
   我试着做一些像
   
    this
   
   但我不能用棱镜。
  
  
   没有Prism,按照上面的链接所示做是非常直接的,但是我不能使用Prism。有人能建议我怎么做到吗?
  
  
   
    我的代码:
   
   
    App.XAML.CS
   
  
  protected override async void OnInitialized()
        {
            InitializeComponent();
            await NavigationService.NavigateAsync("NavigationPage/MainPage");
        }
  
   
    主页
   
  
  <?xml version="1.0" encoding="UTF-8"?>
< TabbedPage xmlns="http://xamarin.com/schemas/2014/forms" 
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 
             xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core" 
             xmlns:android="clr-namespace:Xamarin.Forms.PlatformConfiguration.AndroidSpecific;assembly=Xamarin.Forms.Core" 
             xmlns:windows="clr-namespace:Xamarin.Forms.PlatformConfiguration.WindowsSpecific;assembly=Xamarin.Forms.Core"
             xmlns:local="clr-namespace:MyTabs.Common.Views"
             x:Class="MyTabs.Common.Views.MainPage" BackgroundColor="Olive" BarBackgroundColor="Maroon">
     <TabbedPage.Children>
     <local:PageOne Title="PageOne"
                         Icon="PageOne.png" />
    <local:PageTwo Title="PageTwo"
                         Icon="PageTwo.png" />
    <NavigationPage Title="PageThree" Icon="PageThree s.png">
        <x:Arguments> 
                    <local: PageThree/> 
        </x:Arguments>
        </NavigationPage>
    <local:PageFour Title="PageFour"
                         Icon="PageFour.png" />
    </TabbedPage.Children>
</TabbedPage>
  
   第三页视图模型:
  
  public class PageThreeViewModel : ViewModelBase
    {
        private ICommand pageFiveCommand;
        public ICommand PageFiveCommand { get { return pageFiveCommand; } }
        private void OnCloseCommand()
        {
            _navigationService.GoBackAsync();
        }
        public PageThreeCommand ViewModel()
        {
            pageFiveCommand = new DelegateCommand(OnPageFiveCommand);
        }
        private async void OnPageFiveCommand()
        {
            //await _navigationService.NavigateAsync(?NavigationPage/PageFive");
            await _navigationService.NavigateAsync("GiftCardPage");
        }
    }