首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >.NET MAUI - Tab中的嵌套Tab

.NET MAUI - Tab中的嵌套Tab
EN

Stack Overflow用户
提问于 2022-10-05 22:47:18
回答 1查看 233关注 0票数 0

我正在开发一个应用程序来显示一些体育统计数据,即在这个例子中的排名。我有工作的地方,我有“全面”,“会议”,“部门”选项卡,当我选择“排名”页面,没有问题。不过,我在选项卡中嵌套选项卡有困难。例如,当我进入“会议”页面时,我希望“东方”和“西部”作为子标签。我尝试添加另一个选项卡控件,但没有看到任何不同。

代码语言:javascript
运行
复制
<FlyoutItem Route="standings" FlyoutDisplayOptions="AsMultipleItems">
    <Tab Title="Standings" Route="standings" Icon="standings.png">
        <ShellContent Route="overallstandings"
                      Style="{StaticResource StandingsShell}"
                      Title="Overall"
                      Icon="overall.png"
                      ContentTemplate="{DataTemplate views:OverallStandingsPage}" />
        <ShellContent Route="conferencestandings"
                      Style="{StaticResource StandingsShell}"
                      Title="Conference"
                      Icon="conference.png"
                      ContentTemplate="{DataTemplate views:EasternConferenceStandingsPage}">
                      <Tab Title="Conference">
                          <ShellContent Route="easternconferencestandings"
                            Style="{StaticResource StandingsShell}"
                            Title="Eastern"
                            Icon="eastern.png"
                            ContentTemplate="{DataTemplate views:EasternConferenceStandingsPage}" />
                          <ShellContent Route="westernconferencestandings"
                            Style="{StaticResource StandingsShell}"
                            Title="Western"
                            Icon="western.png"
                            ContentTemplate="{DataTemplate views:WesternConferenceStandingsPage}" />
                      </Tab>
        </ShellContent>
        <ShellContent Route="divisionstandings"
                      Style="{StaticResource StandingsShell}"
                      Title="Division"
                      Icon="division.png"
                      ContentTemplate="{DataTemplate views:DivisionStandingsPage}" />
    </Tab>
</FlyoutItem>
EN

回答 1

Stack Overflow用户

发布于 2022-10-05 22:58:15

另一种选择,在重新阅读之后,我认为您要寻找的是使用选项卡栏。尝试以下几点:

代码语言:javascript
运行
复制
    <TabBar>
        <ShellContent Route="overallstandings"
                      Style="{StaticResource StandingsShell}"
                      Title="Overall"
                      Icon="overall.png"
                      ContentTemplate="{DataTemplate views:OverallStandingsPage}" />
        <ShellContent Route="conferencestandings"
                      Style="{StaticResource StandingsShell}"
                      Title="Conference"
                      Icon="conference.png"
                      ContentTemplate="{DataTemplate views:EasternConferenceStandingsPage}">
            <Tab Title="Conference">
                <ShellContent Route="easternconferencestandings"
                            Style="{StaticResource StandingsShell}"
                            Title="Eastern"
                            Icon="eastern.png"
                            ContentTemplate="{DataTemplate views:EasternConferenceStandingsPage}" />
                <ShellContent Route="westernconferencestandings"
                            Style="{StaticResource StandingsShell}"
                            Title="Western"
                            Icon="western.png"
                            ContentTemplate="{DataTemplate views:WesternConferenceStandingsPage}" />
            </Tab>
        <ShellContent Route="divisionstandings"
                      Style="{StaticResource StandingsShell}"
                      Title="Division"
                      Icon="division.png"
                      ContentTemplate="{DataTemplate views:DivisionStandingsPage}" />
    </TabBar>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73967030

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档