There are three big differences that I see between your design and the one you hope to reproduce:
- They use
Placeholder
in their own Entry
, so when nothing is typed, the "name" will be displayed as text Entry
. - The body
Editor
occupies the rest of the available page. Editor
for the body is surrounded by a black border in the example.
Below is help to fix each problem:
1:
Label
Entry
Placeholder
Entry
. Entry
Placeholder
, Entry
.
, Entry
:
<Entry x:Name="txtFrom" HorizontalOptions="FillAndExpand" Placeholder="Name" ></Entry>
Grid
, Label
s
Entry
Placeholder
2: Editor
Editor
, options FillAndExpand
Layout options. Grid
StackLayout
:
<StackLayout Orientation="Vertical" VerticalOptions="FillAndExpand">
<Grid>
</Grid>
<StackLayout Orientation="Vertical" VerticalOptions="FillAndExpand">
<Editor VerticalOptions="FillAndExpand"/>
</StackLayout>
</StackLayout>
Xamarin LayoutOptions
SO LayoutOptions
3: Editor
Xamarin.Forms . a StackLayout
BackgroundColor
StackLayout
, Padding
. :
<StackLayout Orientation="Vertical" BackgroundColor="Black" Padding="4" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand">
<StackLayout Orientation="Vertical" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" BackgroundColor="White" Padding="4">
</StackLayout>
</StackLayout>