I am new to Xamarin forms and has a basic question to find out the best approach of using Buttons with Image and Text in Xamarin forms.
The task is to design a main page having buttons layout as follows:
I am able to complete this layout using Buttons and StackLayout. I used the ContentLayout property of Button to set the alignments (for example):
- ContentLayout="Right, 80"
- ContentLayout="Right, 25"
- ContentLayout="Right, 100"
- ContentLayout="Right, 10"
This way the image goes to right and the spacing defines the space between text and image. I have to set different spacing for each button that seems to be wrong. I did not find any better way to set the Text as left aligned and it seems to be centered aligned by default.
Is there any property of Button that can be used to left align the button text. Or what will be the better approach to have buttons with this basic design.