Hello,
I have an SfListView filled with items. Each item has a box view above it to act as a separator between the items. I have a converter checking if the item is the first item in the sflistview. If so, it sets the IsVisible property of the box view to false and every other one that is not the first item is set to true.
The problem happens when I drag any item to the first item in the list. When I do this, the new first item (the one that I just moved to the top) has the box view set to false (which is the correct scenario). But the old first item, which is now moved to the second item, still has the box views is visible's property set to false. It needs to be visible since it is now not the first item in the list.
It fixes itself right when I start to drag an item again. It also works correctly if I move the first item out of the first position.
Any help would be greatly appreciated.
Thanks,
David
Hello,
Thank you for the quick reply. The above solution does not work. I implemented it to refresh the item on the drop event.
If I move an item to the top of the list, that separator updates correctly. However, when it pushes the previous first item down. That item's separator does not update.
I have tried to refresh all of the items as well and that did not work.
Any help would be appreciated.
Thanks,
David
private void ListView_ItemDragging(object sender, ItemDraggingEventArgs e)
{
if (e.Action == DragAction.Drop)
{
if (e.OldIndex > e.NewIndex)
{
Device.BeginInvokeOnMainThread(() => ListView.RefreshListViewItem(e.NewIndex, e.OldIndex, true));
}
else
{
Device.BeginInvokeOnMainThread(() => ListView.RefreshListViewItem(e.OldIndex, e.NewIndex, true));
}
}
} |
thanks for the awesome information.
thanks my issue has been fixed.
https://krogerfeedback.nl https://talktosonic.onl https://talktowendys.vip https://whataburgersurvey.onl