Forum Libraries, Components, and Plugins


The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Shell - How to change topbar background color

bruno_jiddbruno_jidd Member

Hello, I am learning the Shell and I am trying to change only the background color from the top tabs in Android and iOs.

the code:

<Shell xmlns="" 

    <!-- Styles and Resources -->
            <Color x:Key="NavigationPrimary">#CCB585</Color>
            <Style x:Key="BaseStyle" TargetType="Element">
                <Setter Property="Shell.BackgroundColor" Value="{StaticResource NavigationPrimary}" />
                <Setter Property="Shell.ForegroundColor" Value="White" />
                <Setter Property="Shell.TitleColor" Value="White" />
                <Setter Property="Shell.DisabledColor" Value="#B4FFFFFF" />
                <Setter Property="Shell.UnselectedColor" Value="#95FFFFFF" />
                <Setter Property="Shell.TabBarBackgroundColor" Value="{StaticResource NavigationPrimary}" />
                <Setter Property="Shell.TabBarForegroundColor" Value="White"/>
                <Setter Property="Shell.TabBarUnselectedColor" Value="#95FFFFFF"/>
                <Setter Property="Shell.TabBarTitleColor" Value="White"/>
            <Style TargetType="TabBar" BasedOn="{StaticResource BaseStyle}" />

            <Tab Title="Home">
                    <FontImageSource FontFamily="Fonts/FontAwesome.ttf#Font Awesome 5 Pro" Glyph="&#xf015;" Size="16"/>

                <ShellContent Title="Para você" ContentTemplate="{DataTemplate viewsHome:ParaVocePage}"  />
                <ShellContent Title="Seguindo" ContentTemplate="{DataTemplate viewsHome:SeguindoPage}" />
                <ShellContent Title="Responder" ContentTemplate="{DataTemplate viewsHome:ResponderPage}" />
                <ShellContent Title="Em Alta" ContentTemplate="{DataTemplate viewsHome:EmAltaPage}" />
            <Tab Title="Tópicos">
                    <FontImageSource FontFamily="Fonts/FontAwesome.ttf#Font Awesome 5 Pro" Glyph="&#xf1ea;" Size="16"/>

                <ShellContent ContentTemplate="{DataTemplate views:AboutPage}" />

Can help me?



  • bruno_jiddbruno_jidd Member
    edited August 2019


  • LandLuLandLu Member, Xamarin Team Xamurai

    You can't separately change the secondary toolbar's background color. If you want to change the whole toolbar's background color you could use Shell.BackgroundColor. It will also change the tabbar's background color if Shell.TabBarBackgroundColor hasn't been set.
    So you need to set Shell.TabBarBackgroundColor to another color value to change the tabbar's background color.

  • saiyamjain143saiyamjain143 Member
    edited January 2020

    Can we change the title color of the second tab?

  • DavidOrtinauDavidOrtinau USForum Administrator, Xamarin Team, Insider, University Xamurai

    We will be making this easier to do directly in the Shell API, but for now this video shows the details of how to do it.

Sign In or Register to comment.