[This documentation is preliminary and is subject to change.]
This example shows the data and structure of a valid gadget manifest.
<?xml version="1.0" encoding="utf-8" ?> <gadget> <name>Sample Gadget</name> <namespace>windows.sdk</namespace> <version>1.0.0.0</version> <author name="Microsoft"> <info url="msdn.microsoft.com" /> <logo src="logo.png" /> </author> <copyright>© Microsoft Corporation.</copyright> <description>Sidebar gadget sample.</description> <icons> <icon height="48" width="48" src="icon.png" /> </icons> <hosts> <host name="sidebar"> <base type="HTML" apiVersion="1.0.0" src="sample.html" /> <permissions>Full</permissions> <platform minPlatformVersion="1.0" /> <defaultImage src="icon.png" /> </host> </hosts> </gadget>
This section defines the individual elements of a gadget manifest.
Required.
The XML declaration defines the XML version and the character encoding used in the document. This particular document conforms to the 1.0 specification of XML and uses the UTF-8 (Unicode) character set.
Attributes:
A container for child elements that describe the gadget. It has no attributes.
Elements:
A user-friendly name that is displayed in the gadget picker, on the Windows Sidebar page of the control panel, and the Sidebar itself.
Specifies the version information for the gadget.
Sidebar uses this value during gadget installation. If another gadget of the same name has already been installed, Sidebar does a version comparison. If the versions differ, the user is prompted to select the appropriate version.
Valid version strings are of the form major.minor.revision.build. Each of these numbers (or octets) can contain 0 to 4 digits between the values of 0 and 9, inclusive.
A container for one or more <host> elements. It has no attributes.
Identifies the application that hosts the gadget (currently, only "sidebar" is supported). Its child elements define the gadget's behavior for a specific host application.
Provides Sidebar with a gadget file type and the API version information required to run the gadget.
The expected value is "Full".
Specifies the minimum Sidebar version required to run the gadget.
Attribute:
Optional.
Specifies the graphic to display as the user drags the gadget from the gadget picker (before the gadget is instantiated) to the Sidebar.
Reserved for future use.
Specifies developer-specific information.
Specifies extended developer-specific information.
Specifies a graphic or icon associated with the developer that is displayed next to the author's name in the gadget picker details.
Displayed to the user in various locations. It can contain any character string.
Displayed to the user in the Gadget Gallery dialog box.
Specifies information for the gadget icon. The graphics file can be any file that's supported by GDI+ 1.0.
A gadget manifest can contain any number of <icon> elements.