Anti aliasing cannot be turned off in WPF. But I want to remove the blurred look of WPF fonts when they are small.

One possibility would be to use a .net 2.0 component. This looks like it would lose the transparency capability and Blend support. Never tried it though.

Anyone has a solution for this? Any drawbacks from it?

Thank you

+1  A: 

Have you tried putting a WindowsFormsHost control on a WPF window/control? That will allow WPF to render a WinForms control.

Judah Himango
This answer speaks volumes about the current state of WPF. Let's hope it improves in VS2010. ;)
Robert Jeppesen

Try using the UIElement.SnapsToDevicePixels property on the UI elements of your window. People tend to report it works best for graphics and lines, but I've noticed improvment in text rendering with it as well.

If done a direct comparison between two identical pieces of text and could not find any difference in the SnapsToDevicePixel setting. Also, judging from the technical reasons behind the "blurriness" I can't imagine how that could help.
David Schmitt
+2  A: 

SnapsToDevicePixels has absolutely no effect on text rendering.


Offset the objects you draw, that you don't want to be antialiased, by 0.5px. This will cause the drawing engine to draw on the actual pixels, rather than drawing on the edge of the pixels (which is the default). When drawing on the edge of a pixel antialiasing normally occurs on the surrounding pixels.

This is similar to Quarts drawing on Mac.

Edit: Sorry, I didn't read the question. This doesn't work for fonts, only for shapes. I will leave the comment here for reference, though.

Ludvig A Norin