我正在开发一个.NET MAUI的移动软件,我的客户要求我更改导航栏的图标和背景 colored颜色 .
但我的问题是:我无法更改页面中图标的 colored颜色 -我try 在styles.xml和ContentPage tag上更改,并使用所需 colored颜色 的图像.但它总是伴随着这个灰色的图标.
为了改变这个 colored颜色 ,我有没有遗漏什么?
这是我试图在代码中更改的内容:
主页
<!-- The color of the icone_home is already white -->
<ContentPage Title="Início"
BackgroundColor="#F1F1F1"
IconImageSource="icone_home.png"
Shell.TabBarTitleColor="Red"
Shell.TabBarBackgroundColor="Red"
Shell.TabBarDisabledColor="Red"
Shell.TabBarForegroundColor="Red"
Shell.TabBarUnselectedColor="Red">
...
</ContentPage>
Styles.xaml
<!-- Yes, I`ve changed all the colors to test each one -->
<Style TargetType="TabbedPage">
<Setter Property="BarBackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource White}}" />
<Setter Property="BarTextColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource White}}" />
<Setter Property="UnselectedTabColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource White}}" />
<Setter Property="SelectedTabColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource White}}" />
</Style>
<!-- Did the same thing for NAVIGATION PAGE and SHELL -->
有什么建议我应该在哪里换乘吗?这款应用程序仅适用于iOS.
谢谢!