How do I change the icon used by my gadget?

23 Apr 2007 08:50 sidebar-gadgets

When you add a new gadget to the sidebar (by right-clicking and selecting “Add Gadgets…”), Windows Vista displays an icon for it.

This icon is controlled by your Gadget.xml file:

<gadget>
  <icons>
    <icon height="48" width="48" src="GadgetIcon.png" />
  </icons>
</gadget>

The icon should be 48 pixels wide and 48 pixels hide. You’ll normally use a .PNG file. As you can see from the above screenshot, I took the normal icon and recoloured it (in Paint.NET) slightly to demonstrate.