【发布时间】:2021-07-14 10:19:10
【问题描述】:
我想从我的内容页面导航到标签页上的第二个标签。请说我该怎么做
<TabbedPage.Children>
<local:MoneyExchangeMainScreen Title="home" IconImageSource="cehome" />
<local:ExchangeWallet Title="wallet" IconImageSource="cewallet" />
<NavigationPage Title="prices" IconImageSource="ceprices">
<x:Arguments>
<local:MoneyExchangePrice />
</x:Arguments>
</NavigationPage>
<local:ExchangePage Title="exchange" IconImageSource="ceexchange" />
<local:ExchangePage Title="settings" IconImageSource="cesetting" />
</TabbedPage.Children>
【问题讨论】:
-
哪个ContentPage?一个包含在选项卡中,还是其他地方?
-
此页面不在标签上。一般来说,这个想法是用户应该登录(单独的内容页面),然后他应该转到标签页上的第二个标签
-
将标签页设置为App的MainPage,并将标签的CurrentPage属性设置为您要显示的标签
-
如果我想从一个页面进入第二个标签,然后在交易之后(以及一个单独的内容页面)我想进入第三个标签怎么办?
-
然后再次更改 CurrentPage 属性。但我会质疑这种设计 - 以编程方式在选项卡之间跳转通常不是一个好主意
标签: c# xamarin xamarin.forms xamarin.android frontend