Due to how the navigation stack is being managed the command bindings are not properly refreshed when navigating between views in UserInterface samples.
Expected Behavior
Navigation is possible between different Views without reloading the application.
Possible Solution
I've tried an approach where i reset the 'BindingContext' in the 'OnAppearing' method and it solves the problem.
Steps to Reproduce
- Open 'UserInterface\Layouts\StackLayoutDemos' solution.
- Run the application.
- Select the AlignmentPage demo.
- Navigate back to the MainPage using the back button.
- Try to select any of the demos available from MainPage UI. Nothing should happen in it's current form.
Possible Implementation
Adding this to the MainPage solves the problem.
protected override void OnAppearing()
{
base.OnAppearing();
BindingContext = null;
BindingContext = this;
}