To achieve this we are going have to set the ContentLayout and Image properties from the Button we want to customize. Let’s just jump right into it.
Here is the XAML
Here is in C#
This is pretty straight forward but I’m going to explain what we are doing. The Image property takes the name of an image resource, that’s going to be the icon for our button. You must add the image on each platform accordingly and remember to include the different sizes for each dpi/screen size for better visuals.
The ContentLayout property has two values separated by a comma. First is the position we want the image to appear in defined by the ImagePosition enumerator we can set the image to the Top, Left, Right or Bottom of the button. The second parameter is the space we want between the button text and the icon.
In the end you will end up with something like the following
And that’s it, hope you found this useful. See you next time.