I am using SfListView and I want autoupdate values (change itemsource) every 5 seconds.
I would like to keep the current position in the scroll after refreshing the ItemsSource collection. I want it without animation.
----------------------------------------------
First i use this:
ExtendedScrollView scrollView = new ExtendedScrollView();
scrollView = ListView.GetScrollView();
ListViewG.ItemsSource = itemList;
ListView.ScrollTo(scrollView.ScrollY);
Works good but with animation. I don´t want it.
------------------------------------------
Then i use:
VisualContainer visualContainer = new VisualContainer();
visualContainer = ListView.GetVisualContainer();
var scrollLineIndex = visualContainer.ScrollRows.ScrollLineIndex;
ListViewG.ItemsSource = itemList;
ListViewGridTechnology.LayoutManager.ScrollToRowIndex(scrollLineIndex, true);
Works only on iOS. Android only change listview on start position after update.
-------------------------------------------------------
Next problem: if I use the second variant, there is a problem with big items. After update, the last one is not displayed correctly. (Attach picture)
Standard ListView work without reset position
Attachment:
update_5b65cee2.zip