Xaml “编译错误”;无法设置ListView的内容,因为它没有';“没有内容属性论坛”;以Xamarin.的形式

Xaml “编译错误”;无法设置ListView的内容,因为它没有';“没有内容属性论坛”;以Xamarin.的形式,xaml,xamarin.forms,compiler-errors,Xaml,Xamarin.forms,Compiler Errors,我基本上希望ListView单元格具有自动高度,这就是我想到的: <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:MovieDbApp.UI" x:Class="MovieDbApp

我基本上希望ListView单元格具有自动高度,这就是我想到的:

<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:MovieDbApp.UI"
             x:Class="MovieDbApp.View.MoviesPage">
    <ContentPage.Content>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <ListView x:Name="listView" Grid.Row="0">
                <DataTemplate>
                    <ViewCell>
                        <StackLayout>
                            <Label Text="{Binding Title}" />
                            <Image Source="{Binding PosterPath}" />
                            <Label Text="{Binding ReleaseDate}" />
                            <Label Text="{Binding DisplayGenre}" />
                        </StackLayout>
                    </ViewCell>
                </DataTemplate>
            </ListView>
        </Grid>
    </ContentPage.Content>
</ContentPage>

这应该很简单,但现在我得到了编译错误,我不知道这意味着什么,因为ListView中没有
ContentPropertyAttribute
,或者至少我找不到任何内容。

您缺少


哦!对不起,我有时候像那样愚蠢。。。万分感谢!
       <ListView x:Name="listView" Grid.Row="0">
          <ListView.ItemTemplate>
            <DataTemplate>
                <ViewCell>
                    <StackLayout>
                        <Label Text="{Binding Title}" />
                        <Image Source="{Binding PosterPath}" />
                        <Label Text="{Binding ReleaseDate}" />
                        <Label Text="{Binding DisplayGenre}" />
                    </StackLayout>
                </ViewCell>
            </DataTemplate>
          </ListView.ItemTemplate>
        </ListView>