您好,我遇到了这个问题,我需要回到我的第一个 Shell 项目,因为我不知道怎么做,而且谷歌搜索没有帮助我在这里问。
<ShellItem Route="ChoicePage" >
<ShellContent ContentTemplate="{DataTemplate local:ChoicePage}" />
</ShellItem>
<ShellItem Route="LoginPage" >
<ShellContent ContentTemplate="{DataTemplate local:LoginPage}" />
</ShellItem>
<TabBar Route="MainPage">
<Tab Title="{helpers:Translate Explore}"
Icon="explore.png"
Route="ExplorePage">
<ShellContent ContentTemplate="{DataTemplate local:ExplorePage}" />
</Tab>
<Tab Title="{helpers:Translate Plan}"
Icon="globe.png"
Route="NextTripsPage">
<ShellContent ContentTemplate="{DataTemplate local:NextTripsPage}" />
</Tab>
<Tab Title="{helpers:Translate Trips}"
Icon="around.png"
Route="MyTripsPage">
<ShellContent ContentTemplate="{DataTemplate local:MyTripsPage}" />
</Tab>
<Tab
Title="{helpers:Translate Map}"
Icon="map.png"
Route="MyMap">
<ShellContent ContentTemplate="{DataTemplate local:FullMapPage }" />
</Tab>
<Tab
Title="{helpers:Translate MeTextProfile}"
Icon="me.png"
Route="MyProfilePage">
<ShellContent ContentTemplate="{DataTemplate local:MyProfilePage}" />
</Tab>
</TabBar>
我有这 2 个 shell 项目,当用户转到ExplorePage
或任何TabBar
我想设置后退按钮返回到ChoicePage
. 我试图添加await Shell.Current.GoToAsync("..");
,但没有运气,甚至PopToRootAsync()
不起作用。