Xamarin image not showing - Android

I have a Xamarin Forms Android application and when I use the following code

 var image = new Image { Source = "lock.png" };

to show the image, but the image is not yet displayed.

And then I try to change the source code to Icon.png (the default Xamarin icon) and it works fine.

Does anyone know how to make this image in my application?

(ps: image path: ". \ MyApp.Droid \ Resources \ drawable \ lock.png".)

+4
source share

All Articles