2

这应该是一个简单的...我正在尝试在 Xamarin Forms 中制作一个非常简单的 TabbedPage。以下是详细信息:

  • 在带有 Sierra (10.12.3) 的 Apple 上使用 Xamarin Studio Community 6.3
  • iOS Preview 可以正常显示标签
  • Android Preview显示选项卡 - 仅显示第一个子页面
  • 无论是使用 XAML 还是代码,都会发生同样的事情
  • 这是一个简单的新 Xamarin Forms 解决方案,来自初始样板代码,没有添加任何其他内容。

XAML:

<?xml version="1.0" encoding="utf-8"?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:MyApp" x:Class="MyApp.MyAppPage">
    <TabbedPage.Children>
        <ContentPage Title="#1"><Label>Testing 1</Label></ContentPage>
        <ContentPage Title="#2"><Label>Testing 1234</Label></ContentPage>
    </TabbedPage.Children>
</TabbedPage>

而已。没有什么花哨。我已经尝试在TabbedPage.Children. 结果相同。预览适用于 iOS 预览,但不适用于 Android。我错过了什么简单的事情?

4

0 回答 0