question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

2022-05-14_18-14-27

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"/> between Grid tags
  • Run

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
ThomasGoulet73commented, May 17, 2022

@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 ?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found