WPF Windows 7 Explorer Toolbar Control

February 12, 2010 by Dave · 2 Comments
Filed under: Code Snippets 

Today I have been working on emulating the Windows 7 Explorer Toolbar in WPF.  I really like this control as it blends the older toolbar and menubar concepts into one which may support icons and dropdown menus.

WPF makes creating new controls quite easy.  I decided to base my controls off of System.Windows.Controls.Toolbar, and similarly each item in the Toolbar is based off of the Button control.

Here’s the XAML that I came up with

Creating a new WPF application and using this code for Window1.xaml, you should see this:

Note that while this control is visually similar to the Windows 7 Explorer Toolbar, it does not handle overflow, or collapse menu items like the Explorer one does. Perhaps an eventual update to this control will provide more advanced support.

This control does handle the IsMouseOver, IsMouseDown, and IsKeyboardFocused states.  Adding the menu glyph is a WPF Polygon.

Awesome Windows 7 Logon background

November 20, 2009 by Dave · 2 Comments
Filed under: Quick Tips 

Just something I thought may be good enough to share.


Click for full sized image.

How To: Set logon background in Windows 7:

- Save the image as backgroundDefault.jpg.

- Place the image in c:\Windows\System32\oobe\info\backgrounds\

Note that you’ll need to create the info and backgrounds folders.

- Open gpedit.msc, the Group Policy editor and Navigate to:

Computer Configuration -> Administrative Templates -> System -> Logon

- Set the Always use custom logon background policy to Enabled.

Windows will now load the custom background each time the logon screen is invoked.

Screenshot of Windows 7 Logon UI: