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

Why Button.Image don't show the Image

$
0
0

I has the folloing code:
In xaml

<Button x:Name="hamburgerButton" HeightRequest="50" WidthRequest="50" HorizontalOptions="Start" FontSize="20" 
                        BackgroundColor="#1aa1d6"  Clicked="hamburgerButton_Clicked"/>
 <Image x:Name="img" HeightRequest="50" WidthRequest="50"  ></Image> 

In Code behind:

hamburgerButton.Image = (FileImageSource)ImageSource.FromFile("burgericon.png");                
img.Source= ImageSource.FromFile("burgericon.png");

I start my Android-project.
I only see the image in "img". The button-image loads the image ( i see this in the debugger) but it did not show the image. Why? Is the Image-property of the button a fake? The button is there. I can click, but i did not see the image.


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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