he Windows Sidebar is one of the most striking features of the new Vista desktop. It's a sort of virtual "desktop appliance" which hosts DHTML applets in Windows Explorer. With Vista and its Sidebar, you can enhance the formerly static Windows desktop with myriad widgets and doodads, appropriately named "Gadgets." By default the Sidebar comes packed with some useful (or maybe just fun) gadgets, such as an RSS streamer, a sticky notepad, a clock/calendar, a CPU meter, and one of those 'slide the tile' games where you try to make the complete picturebut who needs another one of those?
Why the SideBar? Why Now?
You might ask why Microsoft has bothered to raise the Sidebar to desktop prominence in Vistaafter all, isn't that what the Office Suite and Start menu are for? Well yes, but the Sidebar has more features. For example, you can hide the Sidebar, or float it somewhat transparently over other apps. It's convenient, because it makes commonly-used applications easy to find, and it's easily recallable from a hidden state by clicking a tiny icon in the system tray. Another purpose of the Sidebar is to "look pretty!" That's no jokeit's in the documentation. And as long as people who are more artistic than I am are writing the majority of gadgets, I do believe that will remain a primary reason for the Sidebar's existence.
What's in a Gadget?
|Author's Note: Vista was still in RTM at the time of this writing, so there is little "user provided" documentation on the subject.
You can store gadget files wherever you like in the file systemwith one caveat: The top-level folder must be named <Something>.gadget
, where <Something>
is a name of your choice.
Every gadget has an XML file that contains a manifest
The manifest is a simple XML file containing information that describes the gadget and its parts to the host. The gadget manifest must be named gadget.xml
and reside directly within the <Something>.gadget
folder. Here's an example gadget manifest.
<?xml version="1.0" encoding="utf-8" ?>
<author name="Dave Dolan">
<info url="www.davedolan.com" />
<description>Email a tiny bit of text using an Active X
control written in C#!</description>
<base type="HTML" apiVersion="1.0.0" src="gadget.html" />
<platform minPlatformVersion="0.3" />
<version value="18.104.22.168" MinPlatformVersion="0.1"/>
The elements of a gadget manifest file are similar for all gadgets. All gadget manifests contain standard elements such as the name
, and src
attributes under the gadget
element. The name
elements are self explanatory. The author
element lets you give yourself credit (or blame) for the gadget, and the optional info
element under it lets you provide a website link. The hosts
element is there so you can specify a hosting application; although at the present time, there is only one available hostthe Sidebar, which you specify in the manifest in lowercase letters as in the preceding example. The permissions
element theoretically allows you to vary the rights afforded your gadget, but for the time being you must use Full
(which turns out to be quite a lot of permissions).