TabbedPage导航和Shell选项卡导航之间有什么区别

问题描述

基于TabbedPage的导航与基于Shell Tabs的导航(.wrapper { padding-left: 2rem; padding-right: 2rem; width: 960px; position: relative; } header { width: 100%; background-color: red; position: absolute; left: 0; } + Shell + TabBar)之间有什么区别? (如果可能,还带有示例)。

Tab是否替代了旧的page navigation

解决方法

Xamarin.Forms Shell基本上是为了提高Xamarin.Forms应用程序的导航复杂性而开发的容器。 根据Xamarin.Forms Shell文档,它具有以下优点:

  • 降低了移动应用程序开发的复杂性

  • 提供常见的浏览用户体验

  • 使用基于URI的导航方案

  • 具有集成的搜索控制器

要开始在shell中构建UI,这将是起点:

<?xml version="1.0" encoding="UTF-8" ?>
<Shell
      xmlns="http://xamarin.com/schemas/2014/forms"
      xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
      xmlns:views="clr-namespace:ShellNavigationSample.Views"
      x:Class="ShellNavigationSample.AppShell">

</Shell>