【发布时间】:2018-09-12 15:15:25
【问题描述】:
我是 xamarin 的新手,正在尝试显示列表视图。我的尝试如下。
<ContentPage.Content>
<StackLayout>
<ListView x:Name="ComListView" RowHeight="80">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<ViewCell.View>
<Grid Margin="8">
<Label Grid.Column="0" Grid.Row="0" Grid.RowSpan="2" Grid.ColumnSpan="2" Text="hello world" FontAttributes="Bold" />
</Grid>
</ViewCell.View>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
</ContentPage.Content>
但是当我运行应用程序时,即使我导航到正确的页面;什么都没有显示。对于任何其他视图,它将显示正确的输出。那么我在 listview 上哪里会出错呢?
【问题讨论】:
标签: xaml xamarin xamarin.forms