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

UnXaml like behavior

$
0
0

I'm new to Forms, but have a lot of experience with XAML (WPF, Silveright, Phone, etc.) I've started playing around with a Grid in a form, and the child controls aren't getting laid out as I would expect (and desire.) Here's the XAML...

`

<Grid.RowDefinitions>
    <RowDefinition Height="Auto" />
    <RowDefinition Height="Auto" />
    <RowDefinition Height="Auto" />
    <RowDefinition Height="Auto" />
    <RowDefinition Height="Auto" />
    <RowDefinition Height="*" />
</Grid.RowDefinitions>

    <Label Text="Jack Bond Was Here" HorizontalOptions="End"  />

    <Entry Placeholder="First Name" HorizontalOptions="End" Grid.Row="1"  />

    <DatePicker Grid.Row="2"  />

    <Slider HorizontalOptions="Fill" Grid.Row="3"  />

  <Button Text="Click Me" Grid.Row="4" Clicked="GoClicked"  />

    <Frame
      HorizontalOptions="Fill"
      VerticalOptions="Fill"
      Grid.Row="5"
      OutlineColor="Red" />

`

I've attached an image of what the preceding XAML looks like on an Android phone. My questions are:

1) Why isn't the first label horizontally aligned to the right?
2) Why isn't the slider filling horizontally?
3) Why isn't the frame filling horizontally? (it is doing the right thing vertically)

Thanks.


Viewing all articles
Browse latest Browse all 58056

Trending Articles