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

Button with image - not working? (xamarin.forms: 1.2.2.6243)

$
0
0

Hi,

Have anybody succeed in getting an Image on a button?

I have tried create a completely new project (Blank app (Xamarin.Forms portable) - and only changing the following lines in App.cs:

    public static Page GetMainPage ()
    {   
        return new ContentPage { 
            Content = new Button {
                Image = "image.png"
            },
        };
    }

Image is just shown a blue box.

To verify that nothing is wrong with the image - I tried the following:

        return new ContentPage { 
            Content = new Image {
                Source = "image.png"
            },
        };

Image shows up just fine.
I am on xamarin.forms: 1.2.2.6243.
I have tested on iOS only.

Thanks,


Viewing all articles
Browse latest Browse all 58056

Trending Articles