Hi,
The xamarin forms app I am working on allows the users of the app to switch between normal colours and dark mode in the app, I have this working well and the theming throughout the app does what I expect, I am using Tabbed Pages and the following code to create each new form
I have a singleton class that holds the colours globally so the following code is used.
tbiToolsItem.Clicked += async delegate {
ToolsPage tp = new ToolsPage ();
NavigationPage np = new NavigationPage (tp);
np.BarTextColor = Core.Instance.FormForeColour;
np.BackgroundColor = Core.Instance.FormBackColour;
np.BarBackgroundColor = Core.Instance.FormBackColour;
await Navigation.PushModalAsync (np);
};
This works well in colouring the toolbar and the text correctly as per (1) in the image provided. As soon as there are more tabbed pages than can fit on the bottom of the screen in IOS the ...More screen is used, these does not take the colours and I have not found a way to colour it as per (2) in the image, but more importantly it drops the colours on any screen that lands in the more section and I have not found a way to colour those items even though the code above has been used, if I drop the amount of tabbed pages everything works correctly without the more section.
The key thing here is the colouring must happen when the NavigationPage is first created or it does not apply the colours correctly.
I have tried working with the following events with no success.
CurrentPageChanged
PagesChanged
Any help would be appreciated, if I cannot colour the more screen that is not the end of the world, but losing the formatting of the already created pages I cannot live with, I am prepared if its the only way to allow the user to set the dark or non dark mode and then close and start the app again if that is needed to set the colours properly as this will only generally happen once.
thank you.