我有以下選項卡式頁面。我想要做到以下幾點:
1)背景顏色的標籤是白色或一個顏色,一個白色。
2)改變Tab下劃線的顏色。
3)我可以有多少Tab?
4)Text的字體大小。 5)由於每個標籤都有一個contentPage,所以如何從外部引用contentPage,而不是在Tab中,因爲我的內容頁非常長且複雜。
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
BackgroundColor="White"
x:Class="MainPage2">
<ContentPage Title ="Page1" Icon="itemIcon1" WidthRequest="200" BackgroundColor="White">
<ContentPage.Content>
<StackLayout VerticalOptions="Center" HorizontalOptions="Center">
<Label Text="T1">
</Label>
</StackLayout>
</ContentPage.Content>
</ContentPage>
<ContentPage Title ="Page2" Icon="itemIcon2" WidthRequest="200" BackgroundColor="White">
<ContentPage.Content>
<StackLayout VerticalOptions="Center" HorizontalOptions="Center">
<Label Text="T2">
</Label>
</StackLayout>
</ContentPage.Content>
</ContentPage>
<ContentPage Title ="Page3" Icon="itemIcon3" WidthRequest="200">
<ContentPage.Content>
<StackLayout VerticalOptions="Center" HorizontalOptions="Center">
<Label Text="T3">
</Label>
</StackLayout>
</ContentPage.Content>
</ContentPage>
</TabbedPage>
感謝
您在這裏擔心哪些平臺?看起來只是Android,但是你是否也需要在iOS上進行大量的定製?特別是「標籤的下劃線」 – SuavePirate