views:

2082

answers:

3

Does anyone know any kind of framework that enables (not exactly the same, but) Vista's Aero Glass on XP?

I need to develop a little desktop application with WPF, which has a Vista-like UI on XP. I don't need exactly the Aero Glass, some UI like "Windows Live Messenger" will do the thing. Is there any way to make it a reality?

+2  A: 

If you really mean Aero Glass then I think you're out of luck. The hardware acceleration required to create this effect is only supported via Vista's new DWM (Desktop Window Manager), which works by compositing multiple windows together into one rendered layer.

If you just want transparency and non-rectangular windows then this can definitely be achieved in XP, as evidenced by the fact that Windows Live Messenger can do it. Have a look at Layered Windows in MSDN.

Stu Mackellar
What aspect of Glass requires the Vista DWM?
Essentially, it requires hardware acceleration for performance, which isn't available under GDI.
Stu Mackellar
Right. To put it another way. What aspect of Glass requires hardware acceleration considering glass is nothing but ARGB transparency which as you say is available in xp.
No it's not. Glass is a filtered and blurred transparency effect that is achieved with a csutom PS 2.0 pixel shader. It also relies on DWM composition. If you think Aero Glass is simple alpha-channel transparency then I suggest you look a bit closer.
Stu Mackellar
Ah right. The blur. I reckon 90% of the glass feel is the transparency and reflections, but indeed it's not quite the same without the blur.
A: 

Hi, add reference of "PresentationFramework.Aero" to your solution.then write these codes in App.Xaml file:

    <Application.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="/PresentationFramework.Aero;component/themes/aero.normalcolor.xaml"/>
        </ResourceDictionary.MergedDictionaries>
</Application.Resources>

Hope this helps ;)

Matin Habibi
upping this back to 0, its slack to downvote without leaving feedback as to why you did it...
TerrorAustralis
+1  A: 

As Stu Mackellar wrote, Windows XP is missing a required piece in order to obtain Aero Glass effect: DWM. A solution is to create your own "fake" glass effect. Thake a look to this blog (you can download the code).

Stefano Driussi