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

Image not loading in the right way. Please Help me!

$
0
0

Hi,

I'm newbie in xamarin development. I'm developing a xamarin.forms app (ios and android).
I've a content page defined in the main project using an image.
I've added the images to each project.

To andorid proj i've added 3 images in drwable-hdpi,drwable-xhdpi and drwable-xxhdpi all with the same name.

To iOS proj i've added 3 images in the resources folder image.png, image@2x.png, image@3x.png.

this is how in the code I use the image:
var _imgProfile = new Image {Aspect = Aspect.AspectFit};
_imgProfile.Source = ImageSource.FromFile ("profile.png");

i tried the app on an iphone 6, but i can't see the image. If I specify as image name "profile@3x.png" i see the image,
but of course it wan't works on any other device.

Where is my error?
Thank you in advance for your help.
Andrea


Viewing all articles
Browse latest Browse all 91519

Trending Articles



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