Export (0) Print
Expand All

System.Gadget object

[The Windows Gadget Platform/Sidebar is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. ]

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

Members

The System.Gadget object has these types of members:

Events

The System.Gadget object has these events.

EventDescription
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.

 

Methods

The System.Gadget object has these methods.

MethodDescription
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 has these properties.

PropertyAccess typeDescription

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.

 

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

End of client support

Windows 7

End of server support

Windows Server 2008

IDL

Sidebar.idl

DLL

Sidebar.Exe (version 1.00 or later)

 

 

Community Additions

ADD
Show:
© 2014 Microsoft