wpf text blurry blues?

Description

wpf4text

Have you hated how WPF has blurry text depending on what happens?  Well, .Net 4.0 and WPF 4.0 fixes that.  If you try out a version after Visual Studio 2010 beta 2, you can use these fixes as well.  The MSDN Text blog outlines how to fix your text and the why / how of some of the blurriness.  A lot comes from display screens not having a high enough DPI and subpixel rendering.  But enough excuses and how can you fix it?  Here is an example of how to do the look of the picture above.

<StackPanel>
    <TextBlock>
        Hello World ...  Ideal text formatting
    </TextBlock>
    <TextBlock TextOptions.TextFormattingMode="Display">
        Hello World ... Display text formatting
    </TextBlock>
</StackPanel>

The blog posting talks about additional settings as well.

The Discussion

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to send us feedback you can Contact Us.