Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

ImageSource.FromResource throws an error

$
0
0

ImageSource.FromResource used to pull images embedded in a PCL assembly, but now it throws an exception (on Android) saying:

Method 'ImageSource.FromResource' not found.

Here is the offending line of code:

MyTestImage.Source = ImageSource.FromResource("logo_alpha.png");

I don't get it. The Xamarin Forms docs say this method exists ... was working in a prior version. I am using Xamarin 4 now.


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>