【发布时间】:2018-10-17 04:31:58
【问题描述】:
我是 Xamarin Forms 和 C# 的新手。 现在我想在我的 Xamarin Forms 应用中实现 Tabbar。
为此,我使用了以下代码
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Project.Views.DummyPage111">
<TabbedPage.Children>
<ContentPage Title="Tab 1">
<Label Text="Page 1" />
</ContentPage>
<ContentPage Title="Tab 2">
<Label Text="Page 2" />
</ContentPage>
<ContentPage Title="Tab 3">
<Label Text="Page 3" />
</ContentPage>
<ContentPage Title="Tab 4">
<Label Text="Page 4" />
</ContentPage>
</TabbedPage.Children>
</TabbedPage>
它在 Android 和 iOS 中都可以正常工作,但是我需要在 iOS 和 Android 的屏幕顶部保持标签栏的位置。 因此,为此我需要将标签栏移动到我的应用程序的顶部位置。
我需要自定义标签栏位置。
【问题讨论】:
标签: xaml xamarin xamarin.forms xamarin.ios xamarin.android