I have a Xamarin Forms Application with MvvmLight using the Service Locator Pattern. The ViewModelServiceLocator itself is a static class with access to a Autofac container with all dependencies registered. For each VM there is static property:
public static AboutViewModel AboutVm => ServiceLocator.Current.GetInstance<AboutViewModel>();
I have the Locator setup as in my App as a resource follows:
<presentation:ViewModelLocator x:Key="Locator" />
And in my xaml on my page:
BindingContext="{Binding AboutVm, Source={StaticResource Locator}}"
But the Locator is never called. But it does work, when I set it up in the code behind via
BindingContext = ViewModelLocator.AccountListVm;
Do I miss a resource definition or something?