System.Gadget Object

Defines the properties, methods, and events that provide basic gadget functionality.

Members

The System.Gadget object defines the following members:

  • Methods
  • Properties
  • Events

Methods

The System.Gadget object defines the following methods.

Method Description
beginTransition

Suspends all gadget updates, animations, and effects until a docking or undocking transition has completed.

Note  For Windows 7, calls to the System.Gadget.beginTransition and System.Gadget.endTransition methods are ignored.

close

Ends a running instance of a gadget.

endTransition

Refreshes the gadget view and resumes updates, animations, and effects once a gadget docking or undocking transition has completed.

Note  For Windows 7, calls to the System.Gadget.beginTransition and System.Gadget.endTransition methods are ignored.

 

Properties

The System.Gadget object defines the following properties.

Property Access type Description

background

Read/write

Gets or sets the file path for the gadget background image.

docked

Read-only

Gets the dock state of the gadget in relation to the Sidebar.

document

Read-only

Gets an object that represents the DOM of the gadget HTML file.

name

Read-only

Gets the gadget name as specified in the gadget manifest file.

opacity

Read-only

Gets the gadget opacity.

path

Read-only

Gets the UNC location of the gadget source files.

platformVersion

Read-only

Gets the Sidebar version.

settingsUI

Read/write

Gets or sets the HTML filename for the gadget Settings dialog UI.

version

Read-only

Gets the gadget version as specified in the gadget manifest file.

visible

Read-only

Gets the visibility state of the gadget.

 

Events

The System.Gadget object defines the following events.

Event Description
onDock

Event fired when the gadget is docked on the Sidebar.

Note  For Windows 7, because there is no Sidebar associated with the Gadget Platform, the onDock and onUndock event listeners are linked to a new gadget icon ("Larger size" or "Smaller size"). Clicking this icon resizes the gadget and raises the dock ("Smaller size") or undock ("Larger size") event.

onSettingsClosed

Event fired when the gadget Settings dialog is closed.

onSettingsClosing

Event fired when the gadget Settings dialog begins the process of closing.

onShowSettings

Event fired when the gadget Settings dialog is requested.

onUndock

Event fired when the gadget is docked on the Sidebar.

Note  For Windows 7, because there is no Sidebar associated with the Gadget Platform, the onDock and onUndock event listeners are linked to a new gadget icon ("Larger size" or "Smaller size"). Clicking this icon resizes the gadget and raises the dock ("Smaller size") or undock ("Larger size") event.

visibilityChanged

Event fired when the gadget visibility changes due to the Sidebar being hidden or displayed.

 

Requirements

Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
IDL Sidebar.idl
DLL Sidebar.Exe version 1.00 or later

 

 

Send comments about this topic to Microsoft

Build date: 2/24/2010

Build type: SDK