【发布时间】:2015-04-20 13:48:41
【问题描述】:
我创建了一个自定义单元格:
public class TextCell2 : ViewCell
{
public TextCell2()
{
View = new StackLayout
{
Orientation = StackOrientation.Horizontal,
HorizontalOptions = LayoutOptions.FillAndExpand,
Children =
{
new Label
{
Text = "Test"
},
new Button
{
Text = "Test 2"
}
}
};
}
}
如果我不添加任何子项,则单元格是可选择的。 如果我添加任何孩子,则无法再选择单元格。
请帮助我如何在自定义视图中使用选择。
【问题讨论】:
-
尝试 - 将 'IsEnabled = false' 添加到标签和按钮 - 可能是它们正在捕获输入,因此单元格没有得到点击
标签: listview selection xamarin.forms