Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting the DataContext AFTER InitializeComponents causes errors #40

Open
ToddBonnewell opened this issue Dec 15, 2016 · 0 comments
Open

Comments

@ToddBonnewell
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant