I have added 4 buttons to a StackLayout and use the ContentLayout property to set the spacing between an image and the buttontext. When the image is placed next to the text the spacing is working as expected. But when i place the image above of below the text the spacing is not working.
<?xml version="1.0" encoding="utf-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:Buttons" x:Class="Buttons.MainPage">
<StackLayout Padding="50">
<Button ContentLayout="Right,50" Text="Sometext" Image="euro.png" HeightRequest="125" BackgroundColor="Teal" WidthRequest="250" HorizontalOptions="Center" TextColor="White"/>
<Button ContentLayout="Left,50" Text="Sometext" Image="euro.png" HeightRequest="125" BackgroundColor="Teal" WidthRequest="250" HorizontalOptions="Center" TextColor="White"/>
<Button ContentLayout="Top,50" Text="Sometext" Image="euro.png" HeightRequest="125" BackgroundColor="Teal" WidthRequest="250" HorizontalOptions="Center" TextColor="White"/>
<Button ContentLayout="Bottom,50" Text="Sometext" Image="euro.png" HeightRequest="125" BackgroundColor="Teal" WidthRequest="250" HorizontalOptions="Center" TextColor="White"/>
</StackLayout>
</ContentPage>
Attached a screenshot illustrating the problem. Does anyone have an idea what if and what i'm doing wrong?