Forum Xamarin.Forms

Announcement:

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.

UWP - Tabbed Page underline color

DSystemsDSystems Member
edited October 2020 in Xamarin.Forms

I'm trying to change the color of the underline bar of the selected tapped page tab.

It is blue per default and I'm unable to change it.

Does someone know how to go about this?

Answers

  • stXamDevstXamDev Member ✭✭✭
    edited October 2020

    Can you share your code/xaml, because this is what I am seeing . Xamarin version 4.8(latest available)

    <TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
                 xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                 xmlns:d="http://xamarin.com/schemas/2014/forms/design"
                 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                 mc:Ignorable="d"
                 x:Class="DummyTestApp.TabbedPage1"
                BackgroundColor="Lavender"
                BarBackgroundColor="Green"
                BarTextColor="Red"
                SelectedTabColor="Yellow"
                UnselectedTabColor="DeepPink">
        <!--Pages can be added as references or inline-->
        <ContentPage Title="Tab 1" />
        <ContentPage Title="Tab 2" />
        <ContentPage Title="Tab 3" />
    </TabbedPage>
    

    image

  • DSystemsDSystems Member

    I created a new project and copied your xaml. I'm also on the latest xamarin version (4.8.0.1538)

    <TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
                xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                xmlns:d="http://xamarin.com/schemas/2014/forms/design"
                xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                mc:Ignorable="d"
                x:Class="TabbedPageTests.MainPage"
                BackgroundColor="Lavender"
                BarBackgroundColor="Black"
                BarTextColor="Red"
                SelectedTabColor="Yellow"
                UnselectedTabColor="DeepPink">
    
        <ContentPage Title="Tab 1" />
        <ContentPage Title="Tab 2" />
        <ContentPage Title="Tab 3" />
    
    </TabbedPage>
    

    It still got that bar....

  • DSystemsDSystems Member

    I'm currently on windows 1809. Could this be the cause of the problem?
    (Cant update since its locked by our companies network policies)

  • LandLuLandLu Member, Xamarin Team Xamurai

    There's no such api exposed to us to modify the color of the underline in Forms.
    I found Forms rewrites a FormsPivot after checking the customer renderer of the tabbed page.


    Unfortunately, it still doesn't offer a property to change this color.
    You could raise this feature request on the GitHub:
    https://github.com/xamarin/Xamarin.Forms/issues

Sign In or Register to comment.