Since last update I'm having some problems with listview refreshing.
In some parts I use observable collections, these work flawless, but in others I use lists because the data changes integrally and there is where I'm having problems.
Y have something like this:
List<DataObject> items = new List<DataObject>();
void UpdateData(DataObject[] NewItems)
{
listView.ItemsSource = null;
items.Clear();
items.AddRange(Newitems);
listView.ItemsSource = items;
}
This code just fails, if the list had no items and the NewItems only has one item it does not refresh at all. I semi-solved it refreshing the ItemTemplate like this:
var template = listView.ItemTemplate;
listView.ItemTemplate = null;
listView.ItemTemplate = template;
But this fails some times, nearly works, but not always.
Is someone having these problems? Any workaround known?
Cheers.