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

Xam Forms Layout issue

$
0
0

I am attempting to create a very simple page and running into an issue. The projectis xamarin forms. I want the page to dispaly different sections. Each section will have a header. The header must have a background color that stretches from one side to another with no margin or padding. I then want the text inside the header to have a margin so it is not pushed up against the side of the page. I have tried stack panels and grids to no avail. Can anyone show me what I am doing wrong.


Heading 1

content


Heading 2

content


Heading 3

content

Here is my xaml


<Grid.RowDefinitions>




</Grid.RowDefinitions>

                <StackLayout Grid.Row="0" Spacing="0" Padding="0">

                    <StackLayout Spacing="4" Padding="0,0,0,15">
                        <Label Text="Description" HorizontalTextAlignment="Start" BackgroundColor="Silver"  LineBreakMode="NoWrap"/>


                        <Label Text="Details" FontSize="12">
                        </Label>
                    </StackLayout>
                    <StackLayout Spacing="4" Padding="0,0,0,15">
                        <Label Text="Address"  HorizontalTextAlignment="Start" BackgroundColor="Silver" LineBreakMode="NoWrap">
                        </Label>
                        <Label Text="Address Details" FontSize="12">
                        </Label>
                    </StackLayout>

......


Viewing all articles
Browse latest Browse all 91519

Trending Articles



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