Forum Xamarin Xamarin.Forms

selected tabbar using shell

VishXamVishXam Member ✭✭

Hi All, I have come across a problem where i am unable to add background colour to selected tabbar using shell in xamarin forms.


  • jezhjezh Member, Xamarin Team Xamurai

    You can try to change the color of tabBar's background and text in AppShell.xaml.

            <Color x:Key="NavigationPrimary">#2196F3</Color>
            <Style x:Key="BaseStyle" TargetType="Element">
                <Setter Property="Shell.BackgroundColor" Value="#ffff00" />
                <Setter Property="Shell.ForegroundColor" Value="White" />
                <Setter Property="Shell.TitleColor" Value="Red" />
                <Setter Property="Shell.DisabledColor" Value="#B4FFFFFF" />
                <Setter Property="Shell.UnselectedColor" Value="#95FFFFFF" />
                <Setter Property="Shell.TabBarBackgroundColor" Value="#ffff00" />
                <Setter Property="Shell.TabBarForegroundColor" Value="White"/>
                <Setter Property="Shell.TabBarUnselectedColor" Value="#95FFFFFF"/>
                <Setter Property="Shell.TabBarTitleColor" Value="Red"/>
            <Style TargetType="TabBar" BasedOn="{StaticResource BaseStyle}" />
    <!-- Your Pages -->
        <Tab Title="Browse" Icon="tab_feed.png">
            <ShellContent ContentTemplate="{DataTemplate local:ItemsPage}" />
        <Tab Title="About" Icon="tab_about.png">
            <ShellContent ContentTemplate="{DataTemplate local:AboutPage}" />
Sign In or Register to comment.