Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TabView is not following fluent design style in WinUI 3 when scaling is not 100% (WindowsAppSDK 1.0) #6076

Closed
1 of 2 tasks
harvinders opened this issue Oct 10, 2021 · 8 comments
Labels

Comments

@harvinders
Copy link

Describe the bug

The TabView is not following the fluent design

Steps to reproduce the bug

Add a TabView with TabViewItem in WinUI 3 desktop app (WindowsAppSDK 1.0 preview 2)

Expected behavior

No response

Screenshots

image

NuGet package version

WinUI 3 - Windows App SDK 0.8: 0.8.0 (If you're seeing your issue in older previews of WinUI 3, please try this release)

Windows app type

  • UWP
  • Win32

Device form factor

Desktop

Windows version

October 2020 Update (19042)

Additional context

Please discard the nuget version above, the actual version is WindowsAppSDK 1.0 preview 2

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Oct 10, 2021
@StephenLPeters StephenLPeters added area-TabView product-winui3 WinUI 3 issues team-Controls Issue for the Controls team and removed needs-triage Issue needs to be triaged by the area owners labels Oct 20, 2021
@harvinders
Copy link
Author

I could still see the issue in preview 3

@devlead
Copy link

devlead commented Nov 15, 2021

Indeed noticed the same.

A lead might be that the control doesn't seem to be present in Themes so maybe that's the issue, noticed when looking at what controls are themed in NuGet package
https://nuget.info/packages/Microsoft.WindowsAppSDK/1.0.0-preview3

Looking at generic xaml then i.e. TabViewItemHeaderBackground, TabViewItemIconForeground etc. isn't present.
image

As a test I added this to my theme and now it more follows my theme

                    <!-- TabView -->
                    <SolidColorBrush x:Key="TabViewItemHeaderBackground" Color="{StaticResource SolidBackgroundFillColorBase}" />
                    <SolidColorBrush x:Key="TabViewItemIconForeground" Color="{StaticResource SystemBaseHighColor}" />
                    <SolidColorBrush x:Key="TabViewItemHeaderForeground" Color="{StaticResource SystemBaseHighColor}" />
                    <SolidColorBrush x:Key="TabViewItemHeaderForegroundPointerOver" Color="{StaticResource SystemBaseHighColor}" />
                    <SolidColorBrush x:Key="TabViewItemHeaderForegroundSelected" Color="{StaticResource SystemBaseHighColor}" />
                    <SolidColorBrush x:Key="TabViewItemHeaderBackgroundSelected" Color="{StaticResource SystemBaseHighColor}" Opacity="0.3" />
                    <SolidColorBrush x:Key="TabViewItemHeaderBackgroundPointerOver" Color="{StaticResource SystemBaseHighColor}" Opacity="0.2" />
                    <SolidColorBrush x:Key="TabViewItemHeaderBackgroundDisabled" Color="Transparent" />

Keys can i.e. be found here

<Style TargetType="local:TabViewItem">

@gabbybilka
Copy link
Member

@MikeHillberg what is the status of this bug for 1.0 servicing?

@harvinders added a bit more context here: #6310 (comment)

@harvinders
Copy link
Author

harvinders commented Dec 8, 2021

@StephenLPeters, Also, note the focus on tab item is also showing properly. On both edges you would see grey gradient.

image

@harvinders
Copy link
Author

harvinders commented Jan 31, 2022

@gabbybilka, @StephenLPeters @ojhad The issue comes only when the Scaling is set to anything other 100%, which is most of the time as the screen resolution generally is high these days and OS sets the scaling to 125% or 150%.
image

The focus also works fine with 100% scaling

image

@harvinders harvinders changed the title TabView is not following fluent design style in WinUI 3 (WindowsAppSDK 1.0 preview 2) TabView is not following fluent design style in WinUI 3 when scaling is not 100% (WindowsAppSDK 1.0) Jan 31, 2022
@gabbybilka gabbybilka added this to the WinUI 3 in WinAppSDK 1.1 milestone Apr 18, 2022
@gabbybilka
Copy link
Member

Fixed as part of 1.1-preview2 🎉 (https://aka.ms/windowsappsdk/1.1/1.1.0-preview2/release-notes)

@dotMorten
Copy link
Contributor

Ugh I wish I had seen this earlier. Drove me nuts for hours yesterday. Thanks for fixing. Will this be in 1.0.4 too?

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Apr 19, 2022
@gabbybilka
Copy link
Member

Ugh I wish I had seen this earlier. Drove me nuts for hours yesterday. Thanks for fixing. Will this be in 1.0.4 too?

@dotMorten It's currently targeting 1.1 stable and we're not planning on servicing it in 1.0.

@ghost ghost removed the needs-triage Issue needs to be triaged by the area owners label Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants