【发布时间】:2018-08-30 02:26:07
【问题描述】:
我正在使用 xaml 中的 TabbedPage 开发选项卡。默认选项卡图标和文本大小很大,所以我需要减小图标和文本的大小。下面是我的main.xaml 代码我在哪里设置图标。
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:TabbedApp">
<local:DairyTabs Icon="dairy" HeightRequest="10" WidthRequest="10" ></local:DairyTabs>
<local:Mykid Icon="kid" ></local:Mykid>
<local:Event Icon="about"></local:Event>
</TabbedPage>
这是标签页的第一页,我将标签页标题设为Title="Dairy"
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
Title="Dairy">
<ContentPage.Content>
<StackLayout>
<Button x:Name="btnDemo" Text="Go for 2nd page"></Button>
</StackLayout>
</ContentPage.Content>
</ContentPage>
请参阅下面的屏幕截图,您可以在其中看到图标和标签文本。
【问题讨论】:
标签: xaml xamarin xamarin.forms tabbedpage