Computer Magic Logo
Image button

Tuesday, May 3, 2016

Published by Aristotelis Pitaridis

Button has an Image property of type FileImageSource that we can use in order to define the location of a small image that is displayed to the left of the button text.

<Button x:Name="MyButton" Text="Click me">
  <Button.Image>
    <OnPlatform x:TypeArguments="FileImageSource"
                iOS="add.png"
                Android="add.png"
                WinPhone="Images/pic.png" />
  </Button.Image>
</Button>