tags:

views:

399

answers:

1

Can someone explain why everything in WPF is blurry? Is this something that can be fixed?

+9  A: 

The reason for this is the antialiasing system that spreads the line over multiple pixels if it doesn't align with physical device pixels.

WPF is resoultion independent. This means you specify the size of an user interface element in inches, not in pixels. A logical unit in WPF is 1/96 of an inch. This scale is chosen, because most screens have a resolution of 96dpi. So in most cases 1 logical unit maches to 1 physical pixel. But if the screen resolution changes, this rule is no longer valid.

All WPF controls provide a property SnapToDevicePixels. If set to true, the control ensures the all edges are drawn excactly on physical device pixels. But unfortunately this feature is only available on control level.

Source: Draw lines excactly on physical device pixels

M. Jahedbozorgan
Note that the SnapToDevicePixels property has no effect on text glyphs. Try this on TextBlock to see what I mean. Unfortunately we're stuck with blurry text for now.
Drew Noakes
There is more about blurry fonts over here: http://stackoverflow.com/questions/190344/wpf-blurry-fonts-problem-solutions
Spoike