Ian Warburton
Ian Warburton

Reputation: 15676

Why does Tabbar background appear lighter?

I have set the following blue background on several views and they all look the same...

enter image description here

When I set the same color (using a static property) on a TabBar using BarBackgroundColor = Colors.MyBlue, it appears lighter. It's not my screen because I've looked up the RGB from a screenshot. (In fact, these images are screen shots.)

enter image description here

Is this a feature or a bug?

Upvotes: 2

Views: 139

Answers (1)

nevermore
nevermore

Reputation: 15786

Set the TabBar.Translucent = false in the custom Renderer will fix the issue:

  [assembly: ExportRenderer(typeof(TabbedPage), typeof(CustomTabbedPage))]
    namespace App131.iOS
    {
        public class CustomTabbedPage : TabbedRenderer
        {
            public CustomTabbedPage()
            {
                TabBar.Translucent = false;
            }
        }
    }

Refer: ios-bartintcolor-is-always-lighter-than-the-color-that-is-defined and translucent

Upvotes: 1

Related Questions