Dela via


Tips for writing Sidebar gadgets with SideShow functionality

Here's a few tips for developers writing Sidebar gadgets that interact with Sideshow (the Windows Vista support for auxiliary displays):

Early versions of the Sidebar/Sideshow documentation incorrectly refers to the enabled method as a property. The following code snippet demonstrates how to determine in your gadget whether Sideshow is available using the enabled method:

var sideshowEnabled = System.Gadget.SideShow.enabled();…if (sideshowEnabled) {….}

Also note that the enabled method reports whether Sideshow is supported on that operating system, not whether a Sideshow device is currently available. Thus, it always reports “true” on Windows Vista.

The applicationEvent feature is not fully supported on the currently shipping version of Sidebar and should generally not be used.

You can update content using repeated calls to addText/addImage with the same id value. We recommend that you call remove before updating the content for a given id, otherwise the script may suffer from a memory leak.

Instead of this:

…System.Gadget.SideShow.addText(100, originalContent);….System.Gadget.SideShow.addText(100, newContent);

 Do this:

…. System.Gadget.SideShow.addText(100, originalContent); …. System.Gadget.SideShow.remove(100); System.Gadget.SideShow.addText(100, newContent); …

Thanks,
Paula Tomlinson

Comments

  • Anonymous
    March 06, 2007
    Just a small note. Windows Vista has been out for weeks now, yet nearly all of Windows Live (pertaining to gadgets and everything else) make incorrect reference to the latest version of Vista being RC1.  Live (as well as pretty much everything else having to do with Vista) needs an update VERY badly. We all want to really enjoy Vista and all of its potential, but its little things like evidently not making a priority of updating the Vista documentation and official websites that makes it seem very much like Microsoft is not interested in supporting Vista at all.  What did I pay 400 USD for?

  • Anonymous
    April 10, 2007
    Did you know that you can write a single gadget that works on both Windows Sidebar and Windows SideShow