Ever since the introduction of WPF, applications developed using the technology have all had a similar look – fuzzy. In .NET 4, the developers at Microsoft made great strides in the clarity and readability of WPF applications.
Up until .NET 4, developers have used many tricks to get icons and line edges clearer than they are by default. Whereas some tricks may still be needed, one new property puts an end to much of the fuzziness frustration – UseLayoutRounding.
Below is an example of how UseLayoutRounding can help us. The left image is how WPF acts by default. The right is with UseLayoutRounding set to true.
Left: UseLayoutRounding Disabled Right: UseLayoutRounding Enabled
The above examples are made using a very basic WPF application. The only difference between the applications is whether or not UseLayoutRounding is enabled.
<Image Source="image.png" Width="100" Height="100" />
UseLayoutRounding should be set on a root element, like the main window in this example. MSDN explains it best:
That does it for the UseLayoutRounding property. I can’t imagine any WPF application where this should not be added, as it can only improve the visual quality of your applications.