C# 如何在Xamarin中禁用单击的同时为ListView启用滚动?
我有一个C# 如何在Xamarin中禁用单击的同时为ListView启用滚动?,c#,xamarin,xamarin.forms,C#,Xamarin,Xamarin.forms,我有一个列表视图。当我点击一行时,它在Android应用程序上闪烁。我只想禁用这个闪烁。我已尝试将IsEnabled属性设置为false。但在这种情况下,我不能通过上下移动手指来滚动。 因此,有没有办法在不影响其他事件的情况下停止闪烁?您应该将IsEnabled属性设置为ViewCell,而不是Listview: <ViewCell IsEnabled="false"> //Your Item Layout Coding </ViewCell> YourList
列表视图
。当我点击一行时,它在Android应用程序上闪烁。我只想禁用这个闪烁。我已尝试将IsEnabled
属性设置为false
。但在这种情况下,我不能通过上下移动手指来滚动。
因此,有没有办法在不影响其他事件的情况下停止闪烁?您应该将IsEnabled属性设置为ViewCell,而不是Listview:
<ViewCell IsEnabled="false">
//Your Item Layout Coding
</ViewCell>
YourList.ItemSelected+=DeselectItem;
public void DeselectItem(object sender, EventArgs e)
{
((ListView)sender).SelectedItem = null;
}