I have a form with a custom viewCell that looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="EvalUate.DetailsPage" Title="{Binding Name}">
<ContentPage.Content>
<ScrollView>
<ListView x:Name="CriteriaList" ItemsSource="{Binding Criteria}">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<ViewCell.View>
<StackLayout Orientation="Horizontal">
<Label Text="{Binding Name}" />
<Label Text=" " />
<Label Text="Rated: " />
<Label Text="{Binding Rating}" />
<Label Text=" " />
<Label Text="Value: " />
<Label Text="{Binding Importance}" />
</StackLayout>
</ViewCell.View>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</ScrollView>
</ContentPage.Content>
</ContentPage>
the problem is that the columns do not align. I thought I could replace the StackLayout with a Grid, but I can't seem to get that to work. Here is what I tried,
<Grid>
<RowDefinitionCollection>
<RowDefinition />
</RowDefinitionCollection>
<ColumnDefinitionCollection>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</ColumnDefinitionCollection>
<Label Text="{Binding Name}" Grid.Row="0" Grid.Column="0" />
<StackLayout Orientation="Horizontal" Grid.Row="0" Grid.Column="1">
<Label Text="Rated: "/>
<Label Text="{Binding Rating}"/>
</StackLayout>
<StackLayout Orientation="Horizontal" Grid.Row="0" Grid.Column="2">
<Label Text="Value: "/>
<Label Text="{Binding Importance}"/>
</StackLayout>
</Grid>
But this throws an exception. Is there documentation on using a grid in XAML?