I'm using Shell and I can change the nav bar color to yellow, which works well also when navigating.
Like this:

That's achieved using the following style:
<Shell.Resources>
<ResourceDictionary>
<Style x:Key="BaseStyle" TargetType="Element">
<Setter Property="Shell.BackgroundColor" Value="White" />
<Setter Property="Shell.ForegroundColor" Value="{StaticResource ONRSRYellow}" />
<Setter Property="Shell.TitleColor" Value="{StaticResource ONRSRDarkGrey}" />
<Setter Property="Shell.DisabledColor" Value="#B4FFFFFF" />
<Setter Property="Shell.UnselectedColor" Value="#95FFFFFF" />
<Setter Property="Shell.TabBarBackgroundColor" Value="White" />
<Setter Property="Shell.TabBarForegroundColor" Value="Black"/>
<Setter Property="Shell.TabBarUnselectedColor" Value="{StaticResource ONRSRDarkGrey}"/>
<Setter Property="Shell.TabBarTitleColor" Value="Black"/>
</Style>
<Style TargetType="TabBar" BasedOn="{StaticResource BaseStyle}" />
</ResourceDictionary>
</Shell.Resources>
Sometimes I have to replace the shell content with a "service not available" page, and then bring up the original content back once service is available again. I use the method suggested here: https://forums.xamarin.com/discussion/181459/how-to-change-shellcontent-contenttemplate-from-code-behind.
Basically something like this:
if (!serviceAvailable) {
// replace with service not available page
((AppShell)Shell.Current).ReportsTab.Items[0] = new ShellContent { Content = new NoConnectivityPage()};
}
else {
// restore the reports page
var newshellcontent= new ShellContent { Content = new ReportsPage()};
((AppShell)Shell.Current).ReportsTab.Items[0] = newshellcontent;
}
The problem is upon displaying the original content, the style is also reset and the above style is no longer applied.
The best I've achieved is the reports page nav bar background is now yellow, but once navigating the back button and toolbar button are also yellow therefore not visible.
Shell.SetForegroundColor(((AppShell)Shell.Current).ReportsTab, (Color)Application.Current.Resources["ONRSRYellow"]);

How can I fix this so the back button and toolbar button are white? What am I missing?
Thanks in advance
Steven