I'm having a bit of trouble deciding on the best way to get the data from the web service to the UI.
Given the asynchronous nature of WebClient how would you build this?
- Model uses WebClient to talk to webservice
- ViewModel asks model for data
- View is databound to ViewModel
On the Async complete event I need to get that data back out of the model to the ViewModel, these are the things I've thought about.
- I could fire an event in the Model that the ViewModel subscribes to.
- I could perhaps do something with passing around callbacks?
- Or should I be doing a second level of INotifyPropertyChanged events between the ViewModel and the Model?
- Or am I very confused and completely misunderstanding MVVM?