Stack Layout.

jembirjembir Member ✭✭

I want a page with a title bar with a button on it and a footer bar with a button on it.
I've managed that.
If I want another label to appear below the top title bar then I can't make it work - no matter what I do it appears in the middle of the screen which I just want to leave empty.
XAML below.

I know the problem is me and not XAML - so. help?

    <StackLayout>
        <StackLayout BackgroundColor="Blue" Orientation="Horizontal"
             VerticalOptions="StartAndExpand">
            <Label x:Name="lbl1" HeightRequest="50"
                 VerticalTextAlignment="Center"
                 HorizontalOptions="EndAndExpand" Text="Title Bar"
                 BackgroundColor="Blue" TextColor="White" />
            <Button x:Name="btn1" HeightRequest="50"
                 Image="hamburgericon.png" WidthRequest="50"
                 BackgroundColor="Blue" HorizontalOptions="EndAndExpand" />
         </StackLayout>
        <StackLayout BackgroundColor="Blue" Orientation="Horizontal"
             VerticalOptions="StartAndExpand">
            <Label x:Name="lbl2" HeightRequest="50"
                 VerticalTextAlignment="Center"
                 HorizontalOptions="EndAndExpand" Text="sub title bar"
                 BackgroundColor="Blue" TextColor="White" />
        </StackLayout>

        <StackLayout BackgroundColor="Blue" Orientation="Horizontal"
             VerticalOptions="EndAndExpand">
            <Label x:Name="lbl3" HeightRequest="50"
                 VerticalTextAlignment="Center"
                 HorizontalOptions="EndAndExpand" Text="Title Bar"
                 BackgroundColor="Blue" TextColor="White" />
            <Button x:Name="btn3" HeightRequest="50"
                 Image="hamburgericon.png" WidthRequest="50"
                 BackgroundColor="Blue" HorizontalOptions="EndAndExpand" />
        </StackLayout>

    </StackLayout>
Tagged:

Best Answers

Answers

  • jembirjembir Member ✭✭

    Guys. Many thanks for this....

Sign In or Register to comment.