Setting Image Source from Codebehind is not working

JassimRahmaJassimRahma ✭✭✭✭USMember ✭✭✭✭
edited April 23 in Xamarin.Forms

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

Best Answer

Answers

Sign In or Register to comment.