Alex Poca
Alex Poca

Reputation: 2566

C# WPF: Blurred Text

I am new to C# WPF and working on somebody else's code. (WPF version 3.0.6920.5011, as read from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0\Setup\Windows Presentation Foundation)

I already gave a look to various (quite old) Stackoverflow solutions, but they don't seem related to this problem: WPF Blurry fonts issue- Solutions, Text is blurred when transformed in WPF.

WPF: Why does text and elements blur if I use dropshadow effect on a parent item looks interesting, but there are no shadows applied to parents.

I observe this "blur" effect whenever an element is included in another one, and it is more and more visible as the inclusion goes deeper:

blurred text

Alas I cannot provide XAML files because of company rules, but there are no settings about ClearType, applied shadows nor to blur effects.

Is there anything else I could check? Thank you in advance

Upvotes: 0

Views: 1162

Answers (1)

Mark Feldman
Mark Feldman

Reputation: 16148

Add this to your top-level <Window> tag:

TextOptions.TextFormattingMode="Display"

This was first announced 10 years ago in a Microsoft post, it's amazing how to this day so few people use it.

Upvotes: 1

Related Questions