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

Setting Image Source from Codebehind is not working

$
0
0

Hi,

I am using below code to set the Image source from codebehind:

ImageWeather.Source = string.Format("weather_icon_{0}", ImageSource.FromResource(outPut.weather[0].icon));

The image file name in my Resources folder is weather_icon_01n.png and the result I am getting from my json is 01n.png that's why I set it using the above code using string.Format so the name will be weather_icon_01n.png

but I am not getting the iage displayed nor getting any error message

where is the issue here?

Thanks,
Jassim


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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