是否可以在Xamarin表单中使用图像集 [英] Is it possible to use Image Set in a Xamarin Forms
本文介绍了是否可以在Xamarin表单中使用图像集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在Xamarin.Forms项目中添加一些图像作为图像集。我按照
我的xaml
< Image VerticalOptions =Center
HorizontalOptions =Center
Source =check_outline_500_active.png>
< / Image>
结果
注意
您可能必须删除mtbs(在mac上)和bin / obj(在您的项目上)或构建缓存可以欺骗您:)
I am trying to add some Images as Image Sets in a Xamarin.Forms project. I followed this guide . But the icon is not displayed. Is it possible actually to use Image Sets in a Xamarin Forms Solution for the iOS project?
<Image VerticalOptions="Center"
HorizontalOptions="End"
Source="check_outline_500_active.png"
WidthRequest="40">
</Image>
解决方案
Yes you can.
- create the Asset catalog
- add Image Set and name it "check_outline_500_active" (without .png)
- add the images
- done
my xaml
<Image VerticalOptions="Center"
HorizontalOptions="Center"
Source="check_outline_500_active.png">
</Image>
Result
Note
You might have to delete mtbs (on the mac) and bin/obj (on your project) or the build cache can fool you :)
这篇关于是否可以在Xamarin表单中使用图像集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文