开发者

How to work with ViewModelLocator in Mvvm Light

I have just started to use and learn mvvm pattern with the help of MVVM L开发者_运维百科ight toolkit. I want to use MVVM Light in my project but I dont know how to use ViewModelLocator. I am not getting what it is used for. Kindly suggest with samples or examples.

Thanks


The locator is a repository of view models. You use it to get access to the view models in your application. The app.xaml defines a global instance of the locator, and individual views can bind their datacontext to properties of the locator which serve up the individual VMs. Check out my sample app to see how things are wired together.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜