Several years ago, Microsoft introduced ClearType.  I've generally been a big fan of ClearType since it's introduction.  However, if you are visually impaired, have high color sensitivity, are not using an LCD monitor, or just don't like the 'feel' of ClearType, you've likely turned this feature off in Windows.

So, there you are, minding your own business, and you decide to create a WPF application using Visual Studio 2008.  You create a new WPF application, and start to edit your Xaml-based window.  But, what's this?  Why is the editor so blurry?  And how come the properties window is fuzzy?

It turns out, the WPF editor in Visual Studio 2008 is, in fact, built using WPF.  That makes very good sense if you think about it, but it also highlights an issue with WPF -- even if you turn ClearType off, WPF applications always render with ClearType.

I'm not here to argue if that was a good or bad decision -- plenty of you have thrashed around that topic in other blogs, forums, etc.  But, if you are finding it hard to use the WPF editor, here are some details which may help.

Although WPF ignores the system-wide ClearType on/off setting, WPF does expose, via the registry, some additional ClearType settings which you can adjust.  Perhaps these will be enough to at least make the editor tolerable.

You can read about these settings here: ClearType Registry Settings.

First off, these registry keys may not exist on your system, so you'll need to create them.  They didn't exist on mine.  Second, I found the screen-shots misleading; they show keys named 'MyDisplay1' for the settings for your 1st display, but I found that 'Display1' was the key name that worked for me.

So, to save you some reading, create the following key:

HKEY_CURRENT_USER\Software\Microsoft\Avalon.Graphics\Display1

In that key, create two DWORD values:

ClearTypeLevel, with a value of 0
and
TextContrastLevel, with a value of 1.

The ClearTypeLevel setting can vary from 0 to 100, and indicates how much color ClearType is Screenshot showing adjusted WPF ClearTypepermitted to use.  At a level of 0, ClearType will render in grayscale -- not perfect, but, hopefully, better than what you are seeing if ClearType's use of color is your primary distraction.

The TextContrastLevel can vary from 0 to 6, and indicates, well, the contrast level.  When set to 6, the text renders very dark and looks more like an inkjet printout when too much ink is put on the paper.

There are other settings you can play with -- for example, Gamma -- but I found the two settings above gave the biggest bang-for-the-buck.

Note that any changes to these registry settings do not take effect within the WPF editor until you restart Visual Studio.