MSDN Archive Home
Help and FAQs
All Resource Updates
Change History (all pages)
This is a project to accompany the WPF SDK blog article about how to customize the window chrome in WPF apps.
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.
Sep 13 2008 at 2:02 AM
, version 8
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: firstname.lastname@example.org
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.
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 KevinXi.CN@gmail.com, thanks.
Sep 22 2009 at 9:45 PM
Noticed a recursion bug in public static void ThrowLastError(), keeps calling itself.. but nice error handling all the same
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();
Sign in to add a comment
Fri Jun 11 2010 at 7:00 AM
More Tags ...
Visual Studio 2005
Visual Studio 2008
Visual Studio 2010
Manage Your Profile
MSDN Flash Newsletter
© 2008 Microsoft Corporation. All rights reserved.