WPF 4 (VS 2010 and .NET 4.0 Series)
page 6 of 18
by Scott Guthrie
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 66431/ 108


New Text Rendering Stack

The WPF text rendering stack has been completely replaced – a change that brings with it significant improvements to text rendering clarity, configurability, and support for international languages. The new text stack now supports display-optimized character layout, to produce text with comparable sharpness to Win32/GDI text:

Figure 5


WPF’s new text stack also now supports explicitly selecting aliased, grayscale, or ClearType rendering modes:

Figure 6


The new text stack allows optimizing text hinting and snapping for either animated or static text. Additionally, the new text stack now supports fonts with embedded bitmaps. This allows many East Asian fonts to render with the sharpness to which Win32 users have grown accustomed.


Since the initial release of WPF, Run.Text has been a normal CLR property. This has meant that Run.Text lacks all the benefits of the WPF dependency property system, most notably the ability to be bound. In WPF 4, we have converted Run.Text to a dependency property allowing developers to use the first WPF supplied bindable Run.  More details can be found here.

Custom Dictionaries

WPF includes a spell checker which before WPF 4 only used the OS-provided dictionary for input validation. This has been a major issue for apps which target specific industries with specialized terminology, as those apps were plagued by misspelling notifications. WPF 4 has introduced an API to allow an application to add words to the dictionaries used by WPF for spell checking.  More details can be found here.

Selection and Caret Brush

In a push to allow rich customization of the look and feel of WPF apps, developers can also now change the brush used to paint WPF text selection and carets via two simple properties: SelectionBrush and CaretBrush:

Figure 7

Figure 8

View Entire Article

User Comments

Title: WPF   
Name: patel jay A
Date: 2010-08-03 5:28:27 AM

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-15 1:53:32 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search