In .NET 4.0, WPF text rendering has been greatly improved.
However, this new feature is not enabled by default.
You can read the complete feature write up on the WPF Text Blog.
The scenario where you get the most payback for using this feature is with text that is sized 15pt and below.
Line of Business forms containing
TextBoxes will have
15pt and will receive the most benefit of this new feature.
The feature is enabled by placing the “
TextOptions.TextFormattingMode” attached property on the UI Element or on a parent UI Element.
<TextBlock Text=".NET 3.5 rendering" />
<TextBlock Text=".NET 4.0 improved rendering" TextOptions.TextFormattingMode="Display" />
The below XAML demonstrates how to have all text rendering use the new text rendering feature by placing the “
TextOptions.TextFormattingMode” attached property on the Window.
In the below example, all child controls of the Window will use the new text rendering.
Title="MainWindow" Height="350" Width="525"
<TextBlock Text="Inherited the .NET 4.0 improved rendering" />
Visual Studio 2010 Beta2 and .NET 4.0 have a lot of new goodness, go check it out!
Have a great day.
Just a grain of sand on the world's beaches.
Posted in Cider Designer, CodeProject, VB.NET, Visual Studio 2010, WPF General