23.4. The Aero Glass Effect

Surprisingly, WPF still doesn't have any built-in way for you to take advantage of the Aero glass effect first introduced in Windows Vista and supported in Windows 7. It gives windows their familiar blurred glass frames, through which you can see other windows and their content.

Before you go any further, it's worth noting that Aero glass won't work on Windows XP. To avoid problems, you should write code that checks the operating system and degrades gracefully when necessary. The easiest way to determine whether you're running on Windows Vista is to read the static OSVersion property from the System.Environment class. Here's how it works:

if (Environment.OSVersion.Version.Major >= 6) { // Vista features are supported. ...

Get Pro WPF in C# 2010: Windows Presentation Foundation in .NET 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.