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

Getting unexpected gradient background with partly rounded corners #6194

Closed
1 of 2 tasks
wbokkers opened this issue Oct 29, 2021 · 7 comments
Closed
1 of 2 tasks

Getting unexpected gradient background with partly rounded corners #6194

wbokkers opened this issue Oct 29, 2021 · 7 comments
Labels
bug Something isn't working product-winui3 WinUI 3 issues team-Rendering Issue for the Rendering team

Comments

@wbokkers
Copy link

wbokkers commented Oct 29, 2021

Describe the bug

I get an unexpected gradient brush when only some corners of a panel are rounded.

Steps to reproduce the bug

  1. Use Windows App SDK 1.0 Preview 3
  2. Add a panel with a background and with only two rounded corners

When using this XAML:

<Border Background="Red" CornerRadius="30,0,0,30"/>

I get this result:

image

Expected behavior

The panel should have a solid background color

Screenshots

image

NuGet package version

WinUI 3 - Windows App SDK 1.0 Preview 3

Windows app type

  • UWP
  • Win32

Device form factor

Desktop

Windows version

May 2021 Update (19043)

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Oct 29, 2021
@StephenLPeters StephenLPeters added product-winui3 WinUI 3 issues team-Rendering Issue for the Rendering team labels Nov 4, 2021
@StephenLPeters
Copy link
Contributor

@codendone and @gegao18 FYI, this is potentially problematic for a lot of the built in controls as well which frequently square one side of the controls corners.

@Marv51
Copy link
Contributor

Marv51 commented Nov 19, 2021

This also occurs in my project in many places when I upgrade to 1.0. Any guidance?
For me this is painfully easy to reproduce. Is more information needed to help to get this fixed as soon as possible?

@RekiDunois
Copy link

This also occurs in my project in many places when I upgrade to 1.0. Any guidance? For me this is painfully easy to reproduce. Is more information needed to help to get this fixed as soon as possible?

I try 0.8 still got the same problem. but UWP has no such a problem

@Marv51
Copy link
Contributor

Marv51 commented Nov 24, 2021

@gabbybilka Are you aware of this issue?

@WelterDevelopment
Copy link

WinAppSDK really needs an update as soon as possible. You really can't call an SDK production ready when the whole UI glitches around depending on the system's display scale... I just can't stress enough how crucial this issue is and how disappointing it is to see that in 2 months no assignee has been found and that it is still in the 'needs-triage' state. This should have top priority.

@WelterDevelopment
Copy link

For people who stumble over this and need a quick way to remove the gradient in the TabViewItemHeader, just add this to App.xaml:

<CornerRadius x:Key="OverlayCornerRadius">0</CornerRadius>

The TabViewItemHeader now looks super ugly but its better than the weird color gradient. Then manually set the CornerRadius for every control that you want to have rounded corners:

<CornerRadius x:Key="CornerRadius">4</CornerRadius>
<CornerRadius x:Key="LargeCornerRadius">8</CornerRadius>

<Style  TargetType="FlyoutPresenter" >
  <Setter Property="CornerRadius" Value="{StaticResource LargeCornerRadius}"></Setter>
</Style>
<Style  TargetType="Button" >
  <Setter Property="CornerRadius" Value="{StaticResource CornerRadius}"></Setter>
</Style>

@gabbybilka
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working product-winui3 WinUI 3 issues team-Rendering Issue for the Rendering team
Projects
None yet
Development

No branches or pull requests

7 participants