Debugging CommonServiceLocator.ActivationExeption in MVVMLight

51 views Asked by At

I'm trying to use Ioc in MVVMLight. SimpleIoc works fine with my ViewModel, but not the NavigationService.

I've drawn a blank googling the error, but suspect the problem might be in my conversion of various C# snippets to VB.net ?

error msg

1

There are 1 answers

2
Ondřej On

Not exactly solving your problem, but: You are using service locator technique, which is considered anti-pattern and it is against MVVM principles. Correct way is to get INavigationService instance in view model's constructor parameter. Maybe you will get somewhere by doing it like I am saying.