Window content renders blurry when targeting .NET 7
See original GitHub issue- .NET Core Version: 7.0.0-preview.4.22229.4
- Windows version: Windows 11 21H2 250% scaling - this might be key in order to repro
- Does the bug reproduce also in WPF for .NET Framework 4.8?: No
- Is this bug related specifically to tooling in Visual Studio (e.g. XAML Designer, Code editing, etc…)? No
Problem description: After changing .NET to ver. 7.0.0 preview 4 window started rendering blurry
Actual behavior: Window is blurry
Expected behavior: Window should not be blurry
Minimal repro:
- Create new WPF Application project targeting 7.0.0 (Preview) framework
- Add
<Button Content="Button in .NET 7.0.0-preview.4.22229.2" VerticalAlignment="Top"/>
betweenGrid
tags - Run
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Developer view crisp / Runtime blurry
First problem: blurry objects and font at runtime. Solution: see https://www.vbforums.com/showthread.php?835267-RESOLVED-Form-blurry-at-runtime ...
Read more >DpiDecorator cause blurry text in my WPF application?
The text are became blurry and not render perfectly as I wish. I use SnapToDevice Pixel, Use Layout rendering, Text formatting mode =...
Read more >High DPI support - Windows Forms .NET Framework
Configuring your Windows Forms app for high DPI support The new Windows Forms features that support high DPI awareness are available only in ......
Read more >WPF Application Blurry on High DPI Screen on Windows 10
Two WPF applications I have written both appear blurry on my new laptop (running Windows 10) when viewed on the laptop screen. Normally...
Read more >How to Fix Windows 10 Blurry Text Issues
Check Your Monitor Settings · Run the ClearType Wizard · Activate the Automated Fix · Change Your Resolution to Match the Target Display...
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
@ThomasGoulet73 Yes, I can confirm that calling https://github.com/dotnet/wpf/blob/e8767ef7cf95e3edf86f0600a85c2cc6270cb530/src/Microsoft.DotNet.Wpf/src/PresentationCore/ModuleInitializer.cs#L49-L50 fixes the issue
@BieleckiLtd This is probably caused by a bug in high DPI initialization in .NET 7.0 Preview 4 caused by #5765 which should be fixed in the next preview by #6245. Could you try calling SetProcessDPIAware at the start of your application (Before you show a Window) and see if it fixes your bug ?