制作第一个标签页代码xaml
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ElronWebtoon_Test.Page1Tab1"
Title="All">
</ContentPage>
添加标签页代码 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"
x:Class="ElronWebtoon_Test.Page1"
xmlns:pages="clr-namespace:ElronWebtoon_Test;assembly=ElronWebtoon_Test"
Title="TabbedPage">
<!--Pages can be added as references or inline-->
<pages:Page1Tab1/>
<ContentPage Title="tab1">
<Grid>
<StackLayout x:Name="romance">
<Label Text="Green" HorizontalTextAlignment="Center" HorizontalOptions="FillAndExpand" Margin="5" />
<BoxView Color="Green" VerticalOptions="FillAndExpand" />
</StackLayout>
</Grid>
</ContentPage>
<ContentPage Title="tab2">
<Grid>
<StackLayout>
<Label Text="Blue" HorizontalTextAlignment="Center" HorizontalOptions="FillAndExpand" Margin="5" />
<BoxView Color="Blue" VerticalOptions="FillAndExpand" />
</StackLayout>
</Grid>
</ContentPage>
<ContentPage Title="tab3">
<Grid>
<StackLayout>
<Label Text="Pink" HorizontalTextAlignment="Center" HorizontalOptions="FillAndExpand" Margin="5" />
<BoxView Color="Pink" VerticalOptions="FillAndExpand" />
</StackLayout>
</Grid>
</ContentPage>
</TabbedPage>
我使用 Xamarin Sample 制作 tabbedPage。
(https://developer.xamarin.com/samples/xamarin-forms/Navigation/TabbedPageWithNavigationPage/)
但如果制作许多标签页,
选项卡式页面的操作栏的标题文本做 2 行
(例如程序员
->程序夯)
我想设置操作栏的字体大小,而不是使用自定义渲染器,我该怎么做?