这是一个后续问题,我在Shell Custom Renderer reset color set by TabBarUnselectedColor中使用自定义渲染器
在我的.Net MAUI应用程序中,我在AppShell
中使用了TabBar
:
<TabBar>
<Tab Title="Home" Icon="{StaticResource IconHome}">
<ShellContent ContentTemplate="{DataTemplate local:MainPage}" />
</Tab>
<Tab Title="Coverage Calculator" Icon="{StaticResource IconCalculator}" >
<ShellContent ContentTemplate="{DataTemplate calculator:CoverageCalculatorPage}" />
</Tab>
<Tab Title="Distributor Locator" Icon="{StaticResource IconLocator}">
<ShellContent ContentTemplate="{DataTemplate locator:DistributorsLocatorPage}" />
</Tab>
<Tab Title="Scan QR Code" Icon="{StaticResource IconQrScanner}">
<ShellContent ContentTemplate="{DataTemplate qrScanner:QrScannerPage}" />
</Tab>
<Tab Title="More" Icon="{StaticResource IconMore}">
<ShellContent ContentTemplate="{DataTemplate more:MoreFeaturesPage}" />
</Tab>
</TabBar>
选项卡的标题是左对齐的。它们可以居中吗?
目前,它看起来像这样:
1条答案
按热度按时间ecbunoof1#
您可以设定
TextView
的对齐方式: