【发布时间】:2018-12-11 00:11:43
【问题描述】:
使用 Xamarin.Forms 和 Prism 我有一个主详细信息页面、一个选项卡式页面和一个内容页面。
我想先显示标签页,所以我在 App.xaml.cs 中设置了它
await NavigationService.NavigateAsync("MyMasterDetailPage/MyTabbedPage");
在我的母版页中,我有导航到标签页和内容页的方法
<Button Text="Home" Command="{Binding NavigateCommand}" CommandParameter="MyTabbedPage" />
<Button Text="Other" Command="{Binding NavigateCommand}" CommandParameter="NavigationPage/MyContentPage" />
这主要按预期工作,但是当我使用母版页导航到 MyContentPage,然后导航到 MyTabbedPage 时,它会说“队列为空”。
我查看了https://github.com/PrismLibrary/Prism/tree/master/Sandbox/Xamarin/HelloWorld 示例,它似乎与我想要的很接近,但仍然无法正常工作。如果像该示例一样,我将默认 NavigationPage 替换为将 ClearNavigationStackOnNavigation 设置为 true 的自定义导航页,我仍然有错误,或者 false 什么都没有发生。
【问题讨论】:
标签: xamarin.forms prism