views:

213

answers:

2

Can I use that effect on my controls just like the BlurEffect? If it's not available, is there a way to "acquire" it? Perhaps via the Reflector?

+2  A: 

Which "Aero" effect are you referring to?

You can extend the glass effects into your client area in a WPF application via DwmExtendFrameIntoClientArea.

If you're just after the blurring, you could use BlurBitmapEffect from WPF directly.

Reed Copsey
You know this semi transparent blurry effect like you see here:http://windows7themes.net/pics/display-aero-effects-such-as-transparency.JPGCan I use it just like any other effect, instead of extending it? Say I wanna apply it to a button on a wpf window, but only on the button.
Joan Venge
Also anywhere a wpf would show correctly, like the BlurEffect, I want it to be shown. In the link you sent, it says you have to use Vista. I want it to work on any OS wpf effects are supported.
Joan Venge
@Joan: That's the DwmExtendFrameIntoClientArea call. It only works on Vista+W7 (since it requires the desktop window manager that comes with Vista). The first link I posted shows you how to do this for a WPF application, in detail.
Reed Copsey
@Joan: Unfortunately, the glass effects require the DWM of Vista/W7+.
Reed Copsey
Thanks, so just to be clear. The BlurEffect for instance would work on other OSes other than Vista/W7, right? It's only this aero effect that requires Vista/W7?
Joan Venge
@Joan: Yes. It's for blurring objects within a window, such as a control. The glass effect is what gives Vista/W7 it's fancy borders via Aero, and only avaialble on Vista+.
Reed Copsey
But one could write a shader for wpf to do the same and then it would work on other OSes other than Vista/W7, right? i.e. there is no barrier/limitation in wpf to prevent getting the same effect.
Joan Venge
@Joan: You don't have access, from within the context of the window (which runs the shader) to get the desktop information cleanly in XP. This would be required, since you're not blurring YOUR content, but rather the content of a window behind your window. I'm sure a workaround would be possible, but the performance would not be good at all...
Reed Copsey
Thanks Reed. Last question: so this functionality to get the desktop info from withing the context of a window is part of Vista/Win7 API but not WPF itself, right?
Joan Venge
@Joan: Yeah - you don't actually get that info in the context of the application, but rather ask windows to render the "glass" stuff for you inside your application. It's a Vista API, and part of the desktop window manager.
Reed Copsey
+1  A: 

No, it is not included.

Yet, there is a Glass Effect in plain WPF that works fine on XP too. It is not the exact duplicate of Aero Glass, but looks nice.

modosansreves