相关疑难解决方法(0)

Xamarin.Forms:在 TabbedPage 选项卡中更改图标和文本大小

我正在使用 TabbedPage 在xaml. 默认选项卡图标和文本大小很大,所以我需要减小图标和文本的大小。下面是我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>
Run Code Online (Sandbox Code Playgroud)

这是选项卡的第一页,我将选项卡的标题指定为 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>
Run Code Online (Sandbox Code Playgroud)

请参阅下面的屏幕截图,您可以在其中看到图标和标签文本。

在此处输入图片说明

xaml xamarin xamarin.forms tabbedpage

6
推荐指数
2
解决办法
1万
查看次数

标签 统计

tabbedpage ×1

xamarin ×1

xamarin.forms ×1

xaml ×1