Chry Cheng
Chry Cheng

Reputation: 3468

How can MVVM Light be used in a WPF User Control Library project?

Specifically, I would like to know how the view model is to be bound to a user control. The examples I have been able to find so far are all WPF Application or WPF Browser Application projects. Even the templates in tool kit are for WPF Application or WPF Browser Application projects. I am using Visual Studio 2010.

Upvotes: 3

Views: 2874

Answers (1)

Chry Cheng
Chry Cheng

Reputation: 3468

Found the ff. in the comments of MVVM Light's site: http://blog.galasoft.ch/posts/2010/03/whats-new-in-mvvm-light-v3/. Basically, in lieu of App.xaml, the view model locator is declared as a resource in the user control. The framework's creator himself has spoken so I suppose this must be the best approach :D

Upvotes: 4

Related Questions