-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Windows] <Border>
on Windows is blurry
#21087
Comments
yeah it doesn't render property even at 100% scaling, the scaling seems like a red herring here. this bug might explain why I'm seeing blurry controls in places - those controls might be using a border internally (not my code)... |
Is there any idea what causes the bug? Or how to fix it? Or is there a workaround? |
(Some issues I reported turned out to be issues with the WinUI 3 itself. So I guess it's important to test if this is a MAUI issue or WinUI 3 issue. One can create a simple WinUI 3 application and test if the border is broken there as well. I think I can do this in the evening to gather more info.) Other than that I would love this issue to be fixed as well :) |
WinUI 3 testThe app is here: https://github.com/MartyIX/LineHeight202404/tree/demo/202405/border (MartyIX/LineHeight202404@eaa4255) BorderThickness=4<Border BorderBrush="White" BorderThickness="4" Height="108" Width="64">
<TextBlock Text="Test"/>
</Border> Result: Magnified (1256%): BorderThickness=1<Border BorderBrush="White" BorderThickness="1" Height="108" Width="64">
<TextBlock Text="Test"/>
</Border> Result: Magnified (1800%): -> So it looks like it's a MAUI bug. |
Ok, the story unfolds:
So I guess the question is why MAUI draws the border using WinUI's |
This is still a very disturbing issue for users! Even when setting Windows to 100%, it still happens over and over again. It would be great to look into this problem in order to find a solution to fix it. |
@MartyIX please edit the issue to make this not about scaling - it isn't due to scaling, and Microsoft clearly will not care about scaling issues but might care about issues that affect everyone. |
<Border>
on Windows when display with display set to scale 250%<Border>
on Windows when display with display set to scale 25
<Border>
on Windows when display with display set to scale 25<Border>
on Windows is blurry
Found this issue as I'm experiencing the same thing. I have a border around a grid and the top row is a header with a background colour. Border is same colour as the header background but the join between is not seamless because it looks like the border is aliasing to the the background behind the header (which as I'm debugging is a bright primary colour) and none of the 3 pixels of my 1 pixel border is the colour I asked for. This creates unnecessary visual noise. Frame provides 2 pixel solid border but in another case there is a recent comment saying it will be deprecated very soon, and the thickness of the border is not controllable in Frame down to 1px. I run at 150% scaling but tested at 100%. It is NOT to do with desktop scaling. I have also tried a 0.5px border width. As a work around, because I want my borders square and not rounded, I have succeeded. My root element was a border and first child a grid. I removed the border and applied a 0.5 margin to the content of the grid, and after all other content (so that they draw on top), added 4 boxviews, one for each side. height/Width request 0,5 accordingly and height/width options to fill (so top border is
And so on for the other 3 sides (with column/rowspans as necessary). Crisp 1 pixel border and no noise.. |
I changed it. I think you guys should upvote microsoft/microsoft-ui-xaml#9338. It does not look like this can be fixed on the MAUI's side. Or any other WinUI issue that is relevant here. |
Description
Add

<Border>
your MAUI application (e.g. MartyIX/MauiBorderBlurred202403@ccdb380), then the application should look like this:Now, if one zoomes in to see the button, it looks like this:
And there the border is composed of three (or four) parallel lines:
My expectation would be
So that the border is sharp.
My best guess is that this is a WinUI issue:
Possibly relevant links:
Steps to Reproduce
<Border>
pixelsLink to public reproduction project repository
https://github.com/MartyIX/MauiBorderBlurred202403
Version with bug
8.0.7 SR2
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
Windows 11
Did you find any workaround?
No.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: