I'm trying to modify some items from a ListView on my Windows Phone RunTime app.
The Items are binded to the ListView by a simple binding:
this.defaultViewModel["myBinding"] = pi;
and in xaml:
<ListView ItemsSource="{Binding myBinding}" ... >
Then, I'm modifying the binding from code:
List<myItem> pi = (List<myItem>)this.defaultViewModel["myBinding"];
pi.RemoveAt(5);
Now, I want to update the UI with the new modified pi. I know that this.defaultViewModel["myBinding"] = null; and then this.defaultViewModel["myBinding"] = pi; works, but it doesn't keep the scroll position of ListView (it jumps to top after doing this).
Also I have tried this answer, but seems that UpdateTarget is not available in Windows Phone RunTime apps.
So, what should I do to force refresh ItemsSource of my ListView, without losing it's scroll position?