Search Wiki:
This is a project to accompany the WPF SDK blog article about how to customize the window chrome in WPF apps.
http://blogs.msdn.com/wpfsdk/archive/2008/09/08/custom-window-chrome-in-wpf.aspx

It has a sample project with source that implements the techniques described in the article, as well as a sample application (an address book using Vista's Windows Contacts) that uses the Chrome project to create a UI similar to what Office 2007 does with its caption area.

The AddressBook.xaml file in the sample project demonstrates how to use the ChromeHelper object. Applications written using the ChromeHelper should work on Vista and XP, though the Glass options will not have any effect on systems without DWM composition enabled.

Feedback is appreciated. Any questions about, or issues with, the design or implementation can be posted to the Discussions tab.



Updates since release:
2008 Sept 12:
Updated the source (and binaries) to correct a bad declaration of attached DependencyProperties. Aside from being wrong, this occasionally caused issues when loaded in Blend.
Last edited Sep 13 2008 at 2:02 AM  by JoeCastro, version 8
Comments
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: xeonix@i.ua

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 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 KevinXi.CN@gmail.com, thanks.

Updating...
Page view tracker