Search Wiki:
This is a project to accompany the WPF SDK blog article about how to customize the window chrome in WPF apps.

This project has been replaced by the WPF Shell Integration Library. It now includes an updated version of the chrome library with many improvements based on feedback about from the original.

The approach to the implementation is still the same. The original version of the library is still posted here with source. The WPF Shell Integration Library also contains source code.
Last edited May 7 2010 at 9:01 PM  by JoeCastro, version 10
xeonix wrote  Nov 6 2008 at 7:08 PM  
Chrome is cool! With it i can add a Button, so one of it's part is in Window's caption and the other part - in client area.
but, there is one problem:
i'm adding a Button like in Office 2007 to the left upper corner of Window, so part of Button is on Window's caption and the other part - on client area. if mouse pointer on the Button's part which is in client area - everythings woks fine, but when i point
Button's part which is in Window's Caption area, unlike Office 2007, HitTest, Click and all other events doesn't wok!
if you fix it, let me know:

JoeCastro wrote  Nov 20 2008 at 2:48 AM  
This should work, though you have to opt-in. It's supported by adding the attached property ext:WindowChrome.HitTestable="True" to the Button you want to put in the caption area. There's an example in the address book app.

KevinXi wrote  Apr 13 2009 at 5:37 AM  
I am developing WPF applications on Windows XP sp3, and I want to custom the non-client area and remove the white border.
Considering performance issues, I decide to avoid using layered mode in my window, so I tried Chrome library, it helps me to remove the unwanted border.

Recently, when I switch the window between full screen and normal state, I found a bug existed in Chrome:
when I set the window style to None, and set the state to maximized, the window will be displayed in full screen mode, but when I use Chrome and enter the full screen again, the window's bottom part will be covered by the system taskbar. Any ideas for this issue, contact me, thanks.

brianbruff wrote  Sep 22 2009 at 9:45 PM  
Nice sample.
Noticed a recursion bug in public static void ThrowLastError(), keeps calling itself.. but nice error handling all the same

JoeCastro wrote  Sep 29 2009 at 2:48 PM  
thanks. Global search and replace typo that I didn't catch in this snapshot. Should be ((HRESULT)Win32Error.GetLastError()).ThrowIfFailed();

Page view tracker