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

Images not working

$
0
0

hi everyone,

I'm developing a cross platfom app, and I want it to show some images. I have a code such as this one, but it doesn't work:


var image1 = new Xamarin.Forms.Image
{
Source = "pic3.png"
};

var MainScrollView = new ScrollView
{
Content = new StackLayout
{
Children =
{
image1
}
}
};


The code is in the constructor of the file pippo.xaml.cs

If I put a Label instead of the Image it works

pic3.png is in "Resources/Drawble"


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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