Getting unexpected gradient background with partly rounded corners
See original GitHub issueDescribe the bug
I get an unexpected gradient brush when only some corners of a panel are rounded.
Steps to reproduce the bug
- Use Windows App SDK 1.0 Preview 3
- 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:
Expected behavior
The panel should have a solid background color
Screenshots
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)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Linear Gradient with Round corners - css
I am creating a background image using linear gradients. How to to add round corners for each linear gradient.
Read more ><gradient> - CSS: Cascading Style Sheets - MDN Web Docs
Chrome Edge
Full support. Chrome26. more. Toggle history Full support. Edg...
conic‑gradient() Full support. Chrome69. Toggle history Full support. Edg...
Double‑position color stops Full support. Chrome72....
Read more >border-top-left-radius - CSS: Cascading Style Sheets | MDN
The border-top-left-radius CSS property rounds the top-left corner of an element by specifying the radius (or the radius of the semi-major ...
Read more >Applying CSS rounded corners to gradients???
background-image : -webkit-gradient(linear, left top, right top, ... I want to apply rounded corners to the top two corners of this gradient, ...
Read more >A Farewell to CSS3 Gradients
Read A Farewell to CSS3 Gradients and learn with SitePoint. ... how easily we now conjure up rounded corners, shadows, and object rotations....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed as part of 1.1-preview2 🎉 (https://aka.ms/windowsappsdk/1.1/1.1.0-preview2/release-notes)
For people who stumble over this and need a quick way to remove the gradient in the TabViewItemHeader, just add this to App.xaml:
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: