Support for layered windows
One piece of feedback we've heard loud and clear is that you want layered windows. Well, I'm happy to announce that based on your feedback, we now plan to officially support layered windows in WPF 1.0, coming to a future CTP near you (not necessarily the next CTP, though, it will be the next CTP with major WPF changes).
The details: HwndSource (or more accurately, HwndSourceParameters) will have a constructor parameter for UsesPerPixelOpacity. Setting this to true will enable layered windows w/ a per-pixel alpha channel. Window will behave the same as today -- UsesPerPixelOpacity=false, but Popup change to UsesPerPixelOpacity=true. UsesPerPixelOpacity=true has a couple implications:
- All rendering for that hwnd will be done in software (no hardware acceleration)
- We won't draw a window frame (no WS_CAPTION)
- Transparent pixels will not be hit test or get mouse input
- HwndHost is not supported inside a UsesPerPixelOpacity=true container
The last three stem directly from Win32k.sys's layered windows behavior. In terms of hardware acceleration, we're still trying to work out what's possible on various platforms with reasonable performance & reliability, but didn't want to block all progress on that investigation.
Standard disclaimer -- all product plans are subject to change, this is not a guarantee, etc. etc.
Comments
- Anonymous
December 14, 2005
Really nice news!
If you will not do it, we have to do some hard workarounds. Thank you to free our hands :-) - Anonymous
December 14, 2005
"All rendering for that hwnd will be done in software (no hardware acceleration)"
Would be interesting to hear why. Since layered windows need to be composited, I assume they will be hardware RGBA textures at some point. Hardware (TNT and up) has no problems rendering to RGBA textures, writing Alpha.
So, why no hw accel? - Anonymous
December 14, 2005
Cool! - Anonymous
December 15, 2005
I assume that will not a Vista only feature? - Anonymous
December 15, 2005
The comment has been removed - Anonymous
February 22, 2006
It's out, and there's been a lot of great work since the last major CTP.   Layered Windows... - Anonymous
February 26, 2006
that's great news :) Is it still true that it's not hardware accelerated at all or did you find a way for that? - Anonymous
December 08, 2006
A feature that the WPF team added late to WPF was the ability to allow transparent windows ( property