【发布时间】:2021-01-17 01:24:52
【问题描述】:
我正在使用 this nuget 包在 xamarin 表单中处理嵌入式图像色调颜色,在 android 中运行良好,但在 iOS 中运行不正常。 根据我的搜索,我对 AlwaysTemplate 使用了渲染模式,但在我的场景中,我无法使用渲染模式。 我正在做的是使用来自解决方案文件而不是来自 iOS 资产的图像引用。
下面是我的代码 sn-p。
<controls:TintedImage
x:Name="ColorChange"
Aspect="AspectFit"
HeightRequest="17"
Source="{local:ImageResource AppName.Images.dot.png}"
TintColor="{StaticResource PlaceholderColor}"
VerticalOptions="Center"
WidthRequest="17" />
如果在 xamarin 表单中没有为 iOS 渲染图像的图像,我想更改 TintColor。
【问题讨论】:
-
那个包真的过时了,连楼主都存档了。我不知道您是否可以为
png图片着色,也许可以尝试使用 svg 图片。 -
谢谢!是否可以更改嵌入图像的色调?
-
任何备用库??
标签: ios image xamarin.forms cross-platform tintcolor