Partager via


Extending a Windows Sidebar Gadget to Windows SideShow 

One of the benefits of writing a Windows Sidebar gadget is that you can create a single gadget that can simultaneously run in Windows Sidebar as well as supply data to devices using Windows SideShow. The Sidebar gadget can update information on these devices when the computer is running and the devices are connected to the computer.

The benefits of extending a Sidebar gadget to Windows SideShow include:

  • Low incremental work to target both the desktop and devices
  • Ease of maintaining a single gadget rather than two

There are also drawbacks when you create a single gadget for both platforms:

  • You are restricted to using the Simple Content Format (SCF).
  • The user must run the gadget in the Windows Sidebar environment to make the gadget available for Windows SideShow-compatible devices.

However, the ease of extending a Sidebar gadget to Windows SideShow makes a compelling argument for extending all suitable Windows Sidebar gadgets with this functionality.

User Experience for an Extended Gadget

When you extend a Windows Sidebar gadget to Windows SideShow, the gadget is not immediately listed in the Windows SideShow page of Control Panel. However, it is listed like any other Sidebar gadget in the Gadget Gallery of Windows Sidebar, which is accessible from Sidebar. To add the gadget to Sidebar, drag the gadget to Sidebar or double-click the gadget. The first time the gadget writes any data to Windows SideShow, the user receives a notification that your gadget is also available for Windows SideShow. Through this notification, the user can turn on your gadget on connected devices.

Manifest Additions to Gadget.xml

Every Windows Sidebar gadget uses a manifest contained in the gadget.xml file. The only modification you need to make to this manifest is to add a Windows icon for your gadget. To do this, add a child <ico> element to the <icons> element in the manifest as shown in the following code.

<icons>
  <ico src='gadgetIcon.ico'/>
</icons>

This code indicates that your gadget will use the gadgetIcon.ico file as the icon for Windows SideShow. This icon file should contain 16-pixel, 32-pixel and 48-pixel icons in 32-bit color with an alpha channel. For more information, see "Include an icon to brand your gadget" in Designing the User Experience for the Gadget. For more information about Windows Sidebar gadgets, see Gadget Development Overview.

Windows SideShow API for Windows Sidebar

Windows SideShow is accessible through a set of functions listed under the System.Gadget.SideShowSystem.Gadget.SideShow namespace. These functions include:

  • addimage
  • addText
  • applicationEvent
  • remove
  • removeAll
  • setFriendlyName

For more information about Windows Sidebar, see Windows.

See Also

Concepts

Windows SideShow API Reference

Other Resources

Simple Content Format Reference