我正在使用ReactiveTabbedPage'HomeTabbedPage',它具有4个视图,如图所示
<rxui:ReactiveTabbedPage x:Class="HomeTabbedPage"
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:rxui="clr-namespace:ReactiveUI.XamForms;assembly=ReactiveUI.XamForms"
xmlns:views="clr-namespace:MeasuringPoint.Views;assembly=MeasuringPoint"
xmlns:controls="clr-namespace:MeasuringPoint.Controls;assembly=MeasuringPoint"
xmlns:resx="clr-namespace:MeasuringPoint.Resources;assembly=MeasuringPoint"
xmlns:page="clr-namespace:MeasuringPoint.Pages"
xmlns:vms="clr-namespace:MeasuringPoint.ViewModels"
x:TypeArguments="vms:HomeTabbedViewModel" BackgroundColor="White">
<views:CreateView x:Name="createView" Title="Create"/>
<views:HistoryView x:Name="historyView" Title="History"/>
<views:SyncView x:Name="syncView" Title="Sync"/>
<views:SettingsView x:Name="settingsView" Title="Settings" />
</rxui:ReactiveTabbedPage>
默认情况下,Createview是显示的那个。我需要导航到另一个“页面”,然后返回另一个子视图“ SettingsView”
如果我打电话
HostScreen
.Router
.Navigate
.Execute(new SettingsViewModel())
.Subscribe();
显示设置视图,但选项卡消失。
如果我可以导航回HomeTabbedPage
HostScreen
.Router
.Navigate
.Execute(new HomeTabbedViewModel())
.Subscribe();
然后将显示CreateView。
我在这里想念东西吗?