In general the pattern in this project sets the DataContext to the ViewModel AFTER InitializeComponents is called. When this happens, the xaml is looking to bind to properties that do not yet exist in the ViewModel. Retrieving the ViewModel from the ServiceLocator should happen BEFORE in order to make sure the dependencies exist. Errors appear in the Diagnostics Tools otherwise.
This issue is not apparent because OnNavigatedTo then assigns the DataContext to the ViewModel and the bindings are updated.
In general the pattern in this project sets the DataContext to the ViewModel AFTER InitializeComponents is called. When this happens, the xaml is looking to bind to properties that do not yet exist in the ViewModel. Retrieving the ViewModel from the ServiceLocator should happen BEFORE in order to make sure the dependencies exist. Errors appear in the Diagnostics Tools otherwise.
This issue is not apparent because OnNavigatedTo then assigns the DataContext to the ViewModel and the bindings are updated.