Reputation: 649
maybe it is because it's end of the week, but i'll get crazy over here in a minute.. But maybe it's just because i am new to Windows Runtime programming..
I have a WCF Service (net.tcp) and a WinRT-Consumer. All set up and working.
In my WinRT App i have a ListView, bind to a CollectionViewSource (set to an ObservableCollection).
Listview updates on changing My Source manual, so that's ok.. buuuut,
Now i am retrieving data from my service, which works fine (ObservableCollection = await Proxy.GetUserInfoAsync() ...)
I can tell that the Observablecollection is perfectly updated and has all the items in it i want, but my Listview never get's updated.
I've been searching for a long time now, unsuccessful :(
What i think i got from all the reading: with await i don't need to run anything on my ui thread, as it "returns" to the calling thread automatically(?) .. so maybe someone could give me a hint what i am missing here..
Anyway, thank you very much for your time and have a nice weekend! mr.muh
Upvotes: 0
Views: 424
Reputation: 816
You need to manually update the CollectionViewSource.Source property as this does not know when your ObservableCollection property has been replaced from the service. In the setter of the ObservableCollection, just set this property's value to the new value and it should work.
Upvotes: 1