dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.22k stars 1.75k forks source link

Shell TabBar didn't follow styling ules like describdes in documentation #19530

Open MauriceChocoSwiss opened 10 months ago

MauriceChocoSwiss commented 10 months ago

Description

Hi, in the documentation of Shell TabBar, we can see some examples about configuring the colors of the TabBar items.

In this documentation, we can read that some colors (Title, foreground...) take value of other in case of unset, like title use TabBarForegroundColor in case of TabBarTitleColor isn't set. But in fact, like in screenshot below, it doesn't work like that. We need to specify each values we want to customize.

First, without TabBarTitleColor but with TabBarForegroundColor, the title isn't set to green. image

Second, without TabBarForegroundColor but with TabBarTitleColor, the icon isn't set to green image

It's not a big problem (as I can see here, many others and more complexe), maybe the documentation isn't up to date also. But for people how begin with MAUI, it's little bit confusing.

The problem is present on Windows and Android too, haven't test Mac and iOs

Thank you !

Steps to Reproduce

  1. Create new empty Maui Project with Shell
  2. Add Title and/or Foreground Properties to the TabBar like below =>

<Shell x:Class="ShellTabBarSample.AppShell" xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:ShellTabBarSample" Shell.FlyoutBehavior="Disabled">

<TabBar Shell.TabBarTitleColor="Green" Shell.TabBarUnselectedColor="Red">
    <Tab Title="One" Icon="{StaticResource IconOne}">
        <ShellContent
            Title="One"
            ContentTemplate="{DataTemplate local:MainPage}"
            Route="OnePage" />
    </Tab>
</TabBar>

  1. Run !

Link to public reproduction project repository

No response

Version with bug

8.0.3

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android, Windows, I was not able test on other platforms

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

ghost commented 10 months ago

Hi @MauriceChocoSwiss. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

ghost commented 10 months ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback to reproduce the issue but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

MauriceChocoSwiss commented 10 months ago

Issue updated with steps to reproduce

ninachen03 commented 6 months ago

Verified this issue with Visual Studio 17.10.0 Preview 4 (8.0.0-rc.2.9530 & 8.0.21).I can repro this issue image