Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Xamarin.Forms 4.0 ImageSource Not Working

$
0
0

Hello, I'm a new xamarin developer.I have a problem. I was changing the background of the contentpage with the BackgroundImage function in version 3.6.
But soon the update came and I upgraded to version 4.0. This function has been changed in the new version, but ContentPage does not update the background image even though I have edited the function according to version 4.0. Moreover, it does not give any error in code, also button picture is not valid for this is changing it.

Not Working Code: this.BackgroundImageSource = "drawable/greencihaz.png";

Previously running code: this.BackgroundImage = "drawable/greencihaz.png";

What's the problem with this code?

Old and new codes that work for the button image:

new version: btn.ImageSource = "drawable/green_button2.png";

previously version: btn.Image = "drawable/green_button2.png";


Viewing all articles
Browse latest Browse all 204402


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