开发者

MVVM Light Silverlight Question

开发者 https://www.devze.com 2023-03-08 21:37 出处:网络
Hi I\'ve been getting started with MVVM in Silverlight. When you call your model from your viewmodel the model\'s call to it开发者_开发知识库\'s Web Service is asynchronous. What is the best way of no

Hi I've been getting started with MVVM in Silverlight. When you call your model from your viewmodel the model's call to it开发者_开发知识库's Web Service is asynchronous. What is the best way of notifying the view model when you have your data. Currently I just use the messenger class to fire it back a notification with the data set up a listener on the viewmodel. This works fine but I'm not sure it's the best way of doing it. Can anyone point me in the direction of some best practices? Cheers.


I recommend using the Reactive Extensions for that. Specifically, take a look at the Subject class.

0

精彩评论

暂无评论...
验证码 换一张
取 消