tags:

views:

805

answers:

2

Duplicate:

Is it possible to achieve the “Aero Glass” look on XP?


If I use Winforms and I write a win32 application with it, I can see the Aero glass effects in Vista but not in XP.

How could I achieve the same look across different platforms? I am using WPF.

As a side question, did Microsoft write the Aero glass effects using WPF? If so, shouldn't the glass effect be the default WPF look on the other platforms?

+5  A: 

What "Aero effect" are you referring to? If you're talking about the window glass, then I'm afraid you're out of luck, as the glass effect is made possible only through Vista's Desktop Window Manager.

If you're simply looking for window transparency, rounded corners, etc., then this is certainly possible in XP. Check out this article for more information.

Charlie
Thanks, yeah I meant the glass effect. Desktop Window Manager is outside the .NET I bet?
Joan Venge
Desktop Window Manager is OS-centric (built into Vista). It is not part of the .NET library.
Charlie
+1  A: 

Ok, so most of the DWM stuff is handled by a DLL called dwmapi.dll, it is all in C++ COM because that is how Microsoft writes it's APIs, you may have noticed that to call the methods in the API you have to use some unmarshalled boolean types etc, this is because it has to reach unmanaged code, some of the operations that need to take place are too dangerous for .NET to watch over without interfering, you may also notice that all the return types aren't actually returns you put in Vars as "out" types so the code can modify them in memory and then that information can be read back into your managed .NET code. As far as a way to get similar effects in Windows XP, the only way I can think of is using Windows Blinds and then making a translucent WPF form with a gradient background (with a glass like effect) it would be quite easy to do, but the window will look out of place in Vista and XP and I don't think that it is such a good idea.

Hope this helps :P

Simon

Simon