Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
4/8/2010

Windows Mobile Widgets are lightweight rich Internet applications (RIAs) that run on Windows Mobile devices. They are displayed in a full screen container that provides a user experience similar to a compiled application. Widgets are comprised of source files which can include html, css, Jscript, and image files, and an XML manifest file. No proprietary tools are required for widget creation. Windows Mobile 6.5 provides a set of objects, accessible from script, that allows widgets to create soft key menus and respond to changes in the state of the device. A set of enumeration APIs is also provided, allowing compiled applications to launch, uninstall, or query the metadata of all widgets installed on the device.

Note that, beginning with Windows Mobile 6.5.3, soft keys are replaced by touchable tiles on Windows Mobile Professional phones.

Windows Mobile Widget Files

Windows Mobile Widgets can be made up of multiple files, including at least one HTML file as well as separate JScript files, graphics files, icons, and so on. In addition to the files that contribute to the appearance and functionality of the widget, each widget must also contain an XML manifest file that provides metadata about the widget such as its name, author, and the container in which it should be displayed. For information about the format of this XML manifest file, see Windows Mobile Widget Manifest File.

Packaging Windows Mobile Widgets

Windows Mobile Widgets can be packaged for installation on a device without the need for any special tools.

To package a Windows Mobile Widget
  1. Create a ZIP file that contains all of the source files for the widget and the XML manifest file.

  2. Rename the ZIP file to give it the extension “.widget”.

Localizing Windows Mobile Widgets

A Windows Mobile Widget can be localized in such a way that the same .widget file can provide content in a language determined by the locale settings of the device on which it is running. To do this, create directories parallel to the widget XML manifest file and then name them according to the locale for which they should be used (for example, “en-us”). Put localized versions of the files that make up the widget in each subdirectory. When the widget is run, it will first check for content in the subdirectory named for the device’s current locale. If no subfolder is present, or if the file is not contained within the subfolder, the widget will use the file from the root directory.