Unable to use a grid within a DataTemplate

I am unable to use a grid within a DataTemplate.
Specifically, text does not get rendered when using a grid.

    <ListView ItemsSource="{Binding Services}">
        <ListView.ItemTemplate>
            <DataTemplate>
                <ViewCell>
                    <ViewCell.View>
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition />
                                    <RowDefinition />
                                    <RowDefinition />
                                    <RowDefinition />
                                </Grid.RowDefinitions>

                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition/>
                                    <ColumnDefinition/>
                                </Grid.ColumnDefinitions>

                                <Label Grid.Row="0" Grid.ColumnSpan="2"  Text="{Binding Name}" />
                                <Label Grid.Row="1" Grid.Column="0" Text="Labor:" />
                                <Label Grid.Row="1" Grid.Column="1" Text="{Binding LaborCost}" />

                                <Label Grid.Row="2" Grid.Column="0" Text="Materials:" />
                                <Label Grid.Row="2" Grid.Column="1" Text="{Binding Materials, Converter={StaticResource MaterialsToCostConverter}}" />

                                <Label Grid.Row="3" Grid.ColumnSpan="2" Text="{Binding Description}" />
                            </Grid>
                    </ViewCell.View>
                </ViewCell>
            </DataTemplate>
        </ListView.ItemTemplate>
    </ListView>

Any suggestions?

Answers

Sign In or Register to comment.