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

WinForm Images

$
0
0

Following the guidance at http://developer.xamarin.com/guides/cross-platform/xamarin-forms/working-with/images/ I have added an image to the root of my WinPhone project and set the build action to content.

To make sure that I have set up my Cell right, I used a Uri source for the image. All is good:

        var imgImage = new Image()
        {
            Aspect = Aspect.AspectFit,
            HeightRequest = 50,
            WidthRequest = 50
        };
         imgImage.Source = ImageSource.FromUri(new Uri("http://i.stack.imgur.com/PQBMW.png"));

The problem is that when I reference the image that is in the root, it does not appear:

        var imgImage = new Image()
        {
            Source = "disclosure.png",
            Aspect = Aspect.AspectFit,
            HeightRequest = 50,
            WidthRequest = 50
        };

Am I missing anything ?


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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