【发布时间】:2016-11-07 08:34:36
【问题描述】:
这是我现在正在使用的代码...
items = new List<TextCell>();
items.Add(new TextCell { Text = "Cake", TextColor = Color.Green, Detail = "12 hours left!", DetailColor = Color.Black});
items.Add(new TextCell { Text = "Pie", TextColor = Color.Green, Detail = "14 hours left!", DetailColor = Color.Black });
var buy = new ContentPage
{
Title = "Buy",
Content = new StackLayout
{
VerticalOptions = LayoutOptions.Center,
Children = {
new ListView
{
ItemsSource = items,
ItemTemplate = new DataTemplate(typeof(TextCell))
}
}
}
};
ListView 填充了两个没有内容的空白视图。
我错过了一些财产吗?
【问题讨论】:
标签: c# listview xamarin xamarin.forms