We had a customer write us the other day mentioning that ClearType was turning off when using our RibbonWindow class in Windows Vista with Aero enabled and was falling back to grayscale antialiasing.
After a lot of debugging and searching, we found that the root of the problem was the use of Vista's Aero glass in the client area of a Window in WPF. Basically if glass is disabled or not available (like in Windows XP), everything is fine and renders properly using ClearType. However if you implement your WPF Window such that glass can enter the client area (like in our RibbonWindow or previously-posted GlassWindow that is soon to be released), ClearType will disable and grayscale antialiasing will be used instead.
We traced the line that causes the issue down to this one, which is necessary for any WPF Window to properly support Aero glass in its client area:
// Ensure the background of the composition target is transparent
HwndSource.FromHwnd(hwnd).CompositionTarget.BackgroundColor = Colors.Transparent;
Basically if the Colors.Transparent is set to the Window's composition target, ClearType becomes disabled. If you don't set this however, then glass is not able to enter the client area of the Window.
Here is a great post by Dax Pandhi on how to enable Aero glass in WPF Windows.
In there you can see how the line of code above is used to notify Win32 to use a transparent background for the client area of the window.
After some more searching on Google, we found this post too which explains the issue a bit more:
Give me back my ClearType
That post shows some screenshots of the issue and is very helpful for telling what things will cause ClearType to disable.
I've posted a question about this issue in the Microsoft WPF forum and hopefully Microsoft will do something about this in the future.