I have a view that defines a view model in xaml:
<UserControl.DataContext>
<VM:MainMenuViewModel />
</UserControl.DataContext>ext>
Then my VM: public class MainMenuViewModel
{
private readonly IUnityContainer container;
public MainMenuViewModel(IUnityContainer _container)
{
container = _container;
}
.......
I get an error saying that no accessible constructor exists when the view runs because it isn't injecting the IUnityContainer. What is the "proper" way to access the container from a view model? Thanks.