mvvm-light

Silverlight Constructor Injection into View Model + Design Mode

Hi all. Im trying to get to grips with writing testable ViewModels in Silverlight 4. Im currently using MVVM light. Im using AutoFac and the IoCContainer is doing its job fine. However to inject into the constructor of ViewModels, which are bound to Views I have this constructor chaining: public UserViewModel() : this(IoCContaine...

Silverlight Command Binding a button dynamically? MVVM

Not sure I'm designing this correctly (guidence is appreciated!), but I have a search view which is called from many places. Search screen has has it's own ViewModel. When a user selects something from the search screen (after searching :), I need to send the selection to whatever view requested the search to take place (search screen ...

Cannot find resource named 'Locator' thrown at design time in Blend 4, WPF4.

Hello everybody, In the application I am developing, I have a MainWindow, which is divided in several Views. Each View is a UserControl and has its own ViewModel. By setting a DataContext inside the UserControl, I am able to work in Expression Blend 4 with design-time data. Ops, forgot to say: I am using the "basic" Locator class, no M...

MVVM Light EventToCommand doesn't work inside WP7 Pivot DataTemplate

Hi everybody, I have very strange issue. In my WP7 app I have a pivot control and an item template defined inside it(or in the resources, I have tried both ways, but still same issue). In the template I have a regular button with EventToCommand defined(EventName="Click"). I also have the same copy-pasted button outside the Pivot. The pr...

How to pass data (eg. selecteditem) from one view to another view using viewmodel

Some basic questions, but most examples I see, only contain one view with one viewmodel and one viewmodellocator, so my questions are : Does each viewmodel has it's own viewmodellocator ? (The snippet included in mvvm light toolkit for a viewmodellocator seem to imply this, as it generates a some methods eg. cleanup that has the same n...