Today I got stuck on a thing I didn't expect to get stuck on: loading an image from Asset Catalog Image Set into Page.Icon
property.
I've placed my icon under /Resources/Images.xcassets/Card.imageset
using Xamarin Studio Asset Editor. This icon is being displayed fine when working with, say, ImageCell
. According to the documentation, when I write imageCell.IconSource = "Card";
an implicit conversion to UriImageSource
is performed, and it all works as expected.
But when I write page.Icon = "Card"
an implicit conversion to FileImageSource
is done, and FileImageSource
doesn't seem to be able to deal with Asset Catalog Image Sets.
Is there any way to fix this other than ditching Asset Catalog Image Sets altogether?
Thanks.