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

How to get a label, picker, and entry to align their baselines in a horizontal stacklayout?

$
0
0

I have a Horizontal stack layout contained within a vertical stack layout. I want to ensure that the 3 elements contained within that horizontal stack layout are aligned so that their "baselines" line up.

I can't figure it out. The label and picker are in their own stacklayout so that I can get the entry to fill from the right of the screen.

       <StackLayout Orientation="Horizontal" HorizontalOptions="FillAndExpand">
            <StackLayout Orientation="Horizontal" HorizontalOptions="Start" VerticalOptions="End" Padding="0">
                <Label Text="License Plate" HorizontalOptions="FillAndExpand" YAlign="End" VerticalOptions="End">
                    <Label.GestureRecognizers>
                        <TapGestureRecognizer Command="{Binding TakeVehiclePictureCommand}"></TapGestureRecognizer>
                    </Label.GestureRecognizers>
                </Label>
                <Picker ItemsSource="{Binding StateList}" SelectedItem="{Binding StateCode}" HorizontalOptions="End" VerticalOptions="End" Title="State"></Picker>
            </StackLayout>
            <xfx:XfxEntry Text="{Binding PlateNumber}" Placeholder="Plate Number" HorizontalOptions="FillAndExpand" VerticalOptions="End"></xfx:XfxEntry>
        </StackLayout>

What on earth am I doing wrong?

Thanks,
Matthew


Viewing all articles
Browse latest Browse all 91519

Trending Articles



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