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

Content is not centred inside StackLayout although it should

$
0
0

Hi,
here's my XAML:
`<?xml version="1.0" encoding="UTF-8"?>

<AbsoluteLayout BackgroundColor="Yellow" >
    <StackLayout AbsoluteLayout.LayoutBounds="0.5, 0.05, 0.9, 0.25" AbsoluteLayout.LayoutFlags="All" BackgroundColor="Aqua" VerticalOptions="FillAndExpand">
        <Button Text="Previous" HorizontalOptions="Start" VerticalOptions="Center" BackgroundColor="Blue"/>

        <ActivityIndicator IsRunning="true" HorizontalOptions="Center" VerticalOptions="Center"/>

        <Button Text="Next" HorizontalOptions="End"  BackgroundColor="Blue" VerticalOptions="Center"/>
    </StackLayout>
</AbsoluteLayout>

`

In my understanding both buttons and ActivityIndicator should be centered inside StackLayout. Instead this is what I get:

I set StackLayout's VeticalOptions to "FillAndExpand" to see if it helps, but it doesn't.


Viewing all articles
Browse latest Browse all 91519

Trending Articles



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