Bug 60988 - tabbed page BarTextColor is not pervasive and can't be applied after instantiation.
Summary: tabbed page BarTextColor is not pervasive and can't be applied after instanti...
Status: RESOLVED ANSWERED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.5.0
Hardware: PC All
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-12-05 14:29 UTC by David Brewster
Modified: 2017-12-05 15:08 UTC (History)
1 user (show)

Tags: TabbedPage BarTextColor
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

Description David Brewster 2017-12-05 14:29:53 UTC
The barcode text setting for Tabbed Pages does not "stick" after instantiating. So if you add/remove children from the tabbed page, that text colour won't apply to the new children, and attempts to reapply that setting are in vain.

To reproduce, create a tabbed page with a couple of content pages.
XAML would look like :

   <TabbedPage.BarBackgroundColor>
       <Color x:Uid="colorPrimary">#61a60e</Color>
   </TabbedPage.BarBackgroundColor>

   <TabbedPage.BarTextColor>
       <Color x:Uid="colorPrimary">#ffffff</Color>
   </TabbedPage.BarTextColor>

   <TabbedPage.BackgroundColor>
       <Color x:Uid="colorPrimary">#61a60e</Color>
   </TabbedPage.BackgroundColor>

   <TabbedPage.Children>
       <local:HomePageSavings Title="Savings" x:Name="btnSavings" Icon="Home.png" IsVisible="True"/>
       <local:LoyaltyCard Title="Loyalty" x:Name="btnLoyalty" Icon="Loyalty.png"  IsVisible="True"/>
       <local:eFlyer Title="eFlyer" x:Name="btneFlyer" Icon="eFlyer.png"  IsVisible="True"/>
       <local:GiftCard Title="Giftcard" x:Name="btnGift" Icon="Gift.png"  IsVisible="True"/>
   </TabbedPage.Children>


Now in C# code, try swapping out some pages with (MainPage and LinkLoyalty being content view pages):

               this.Children.RemoveAt(0);
               this.Children.Insert(0, new MainPage { Title = "Home", Icon = "Home.png" });

               this.Children.RemoveAt(1);
               this.Children.Insert(1, new LinkLoyalty { Title = "Loyalty", Icon = "Loyalty.png" });

Try applying the setting again with something like this.BarBackgroundColor = Color.White.
You'll see that it won't apply. The untouched tab still has white text, but any children added do not.
Comment 1 Samantha Houts [MSFT] 2017-12-05 15:08:42 UTC
Thank you for your submission. At this time, all new reports should be made on the Xamarin.Forms GitHub Issues repository. Please resubmit this report at https://github.com/xamarin/Xamarin.Forms/issues. This Bugzilla report will now be closed and will not be monitored.