You cannot set BindingContext
to two different objects simultaneously for the same element. When you write:
BindingContext = appState;
BindingContext = viewModel;
Depending on what you would like to do with AppState would change the way to use it
(simple use case or a more complex one?)
I can't comment as not enough reputation but depending on your use case, you may get a more detailed answer.