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

Image display different using resource or stream

$
0
0

I'm trying to display an image read from stream.

I have a form with an Image View.

If I use:

ImageSource = "name.png"

where name.png is the name of a resource in android drawable, the image display correctly (it expands on the image area)

If I use:

ImageSource = ImageSource.FromResource("name1.png")

where name1.png is a resource in the shared assembly (a copy of the image in android drawable), the image is stretched (don't fit to view area) to top center of the image area.

I have the same behaviour if I read an image in a stream and I use ImageSource.FromStream().

The Image view set a VerticalOptions="StartAndExpand" (Aspect and HorizontalOptions are unsetted)

Any hints?


Viewing all articles
Browse latest Browse all 204402

Latest Images

Trending Articles



Latest Images

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