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

Image doesn't align well in Button

$
0
0

Hi,

Does anyone know how to align the image in a button?

    <StackLayout BackgroundColor="{l:GlobalResource DarkBackground}" VerticalOptions="Center" Orientation="Horizontal" Padding="5,5,5,5">

            <Button StyleId="load" Text="Load" Font="Large" 
                MinimumWidthRequest="40" MinimumHeightRequest="30"
                BackgroundColor="{l:GlobalResource DefaultButtonBackground}" 
                TextColor="{l:GlobalResource DefaultButtonText}" 
                Clicked="LoadClicked" CommandParameter="{Binding Location}" />
            <Label TextColor="{l:GlobalResource LightestText}"
                HorizontalOptions="FillAndExpand" VerticalOptions="Center" 
                Text="{Binding Location.Name}"/>
            <Button Clicked="LocationSelected" CommandParameter="{Binding Location}"
                BackgroundColor="Red" 
                MinimumWidthRequest="24" WidthRequest="24" 
                HorizontalOptions="Center" VerticalOptions="Center" 
                Image="disclosure.png" />

    </StackLayout>

It looks like for android the image is aligned to the right and for iOS the image is aligned to the left

thanks!

imageimage


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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