【发布时间】:2017-02-22 14:59:37
【问题描述】:
我在我的 Droid 项目上将 xamarin.forms 从 v2.0.1.6505 更新到 v2.3.3.180,
我有以下ListView(简单的一个):
customersListView = new ListView() {
ItemsSource = customers,
ItemTemplate = new DataTemplate(typeof(EntityViewCell)),
HorizontalOptions = LayoutOptions.FillAndExpand,
VerticalOptions = LayoutOptions.FillAndExpand,
SeparatorColor = Color.Teal
};
public class EntityViewCell : ImageCell
{
public EntityViewCell() : base()
{
SetBinding(TextProperty, new Binding("Name"));
SetBinding(DetailProperty, new Binding("Description"));
SetBinding(ImageSourceProperty, new Binding("ImageUrl"));
TextColor = Color.Blue;
}
}
我得到以下列表(项目不可见)
为什么在我更新 Xamarin.forms 后出现此问题?
【问题讨论】:
-
客户是否包含数据? EntityViewCell 是什么样的?尝试使用简单的 TextCell 代替,如果可行,您就知道问题出在自定义单元格中,如果不是,那么您的数据源可能是问题所在。
-
客户包含信息,我会更新问题
标签: c# listview xamarin.android xamarin.forms portable-class-library