XAMARIN 通过 PRISM 在 Tabpage 中选择 Tab

问题描述

我有一个标签页视图,里面有 2 个子内容

<?xml version="1.0" encoding="utf-8" ?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
            xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
            x:Class="MultiPosApp.Services.Views.FoodAndBeverageView"
            xmlns:android="clr-namespace:Xamarin.Forms.PlatformConfiguration.AndroidSpecific;assembly=Xamarin.Forms.Core"
            xmlns:local="clr-namespace:MultiPosApp.Services.Views"
            xmlns:prism="http://prismlibrary.com"
            prism:viewmodelLocator.Autowireviewmodel="True"
            Title="Tables &amp; Menu Settings"
            BarTextColor="Black"
            BarBackgroundColor="LightGray"
            android:TabbedPage.ToolbarPlacement="Bottom"
            android:TabbedPage.BarSelectedItemColor="Black"
            x:Name="mytabpage">

    <TabbedPage.Children>
        <local:TablesView Title="TABLES" IconImageSource="Table.png" />
        <local:MenusView Title="MyMenu" IconImageSource="menusetting.png" />
    </TabbedPage.Children>
    
</TabbedPage>

当我尝试使用“SelectTabAsync”时,如下所示,标签页没有切换到 MenusView

m_NavigationService.SelectTabAsync("MenusView");

是不是我做错了什么?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...