开发者

Google Chrome / Windows 7 effect on WPF?

开发者 https://www.devze.com 2022-12-09 22:33 出处:网络
Windows 7 windows naturally have a semi-transparent header. What I just realized is that Google Chrome TabBar bl开发者_如何学Pythonends with this effect as if the TabBar background and the window head

Windows 7 windows naturally have a semi-transparent header. What I just realized is that Google Chrome TabBar bl开发者_如何学Pythonends with this effect as if the TabBar background and the window header was the same thing! pretty much cool!

Is there a way to have the same result with WPF? Any example?

Thanks.


You would need to call down to the Desktop Window Manager APIs. See DwmExtendFrameIntoClientArea, or DwmEnableBlurBehindWindow to apply the glass effect only to a specific region. Use new WindowInteropHelper(myWindow).Handle to get the HWND for passing to these APIs.


See http://blogs.msdn.com/wpfsdk/archive/2008/09/08/custom-window-chrome-in-wpf.aspx for code samples for this and almost every other effect you can find in Vista/Office2007

0

精彩评论

暂无评论...
验证码 换一张
取 消