I have a MasterDetail page. The Detail is a NavigationPage. In the NavigationPage I put a ContentPage. So the hierarchy is:
MasterDetail
- Master
- Detail
- NavigationPage
- ContentPage
The navigation bar in my NavigationPage has an ActivityIndicator in it. The IsRunning property of the ActivityIndicator is bound to the IsRunning property of my ContentPage's view model. So when I load the ContentPage I see a spinning ActivityIndicator in the navigation bar. This works fine.
When I navigate to a new page, I call PushAsync on the NavigationPage to push a new ContentPage on the stack. The new page I push also has a view model with an IsRunning property. The problem is that the binding in the navigation bar is now broken and never shows the ActivityIndicator as running even if I set IsRunning to true.
So it feels like the binding gets broken on navigation. Any ideas on the root cause or how to fix this? Thanks in advance!
BindingContext
is not being set when navigating to the second page. – Tom