System.Gadget.version property

[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. ]

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

This property is read-only.

Syntax

strversion = System.Gadget.version

Property value

A String that receives the version of the gadget.

Remarks

A gadget must have a version specified in the gadget manifest file in order to be displayed in the Gadget Picker.

Possible uses include checking if a newer version of a gadget is available or displaying warnings of possible conflicts with other versions of the same gadget.

Examples

The following example demonstrates how to get the version of a gadget from the gadget manifest.

// The gadget manifest.
<gadget>
  <name>SDK Docked</name>
  <version>1.0.0.0</version>
  ...
</gadget>

// The gadget HTML file with inline script.
<html>
<head>
  <script>
    var mytext = "Gadget Version: " + System.Gadget.version;

    function setContentText()
    {
      gadgetContent.innerText = mytext;
    }
  </script>
</head>
<body onload="setContentText()">
  <span id="gadgetContent" style="font-family: Verdana; font-size: 20px;"/>
</body>
</html>

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)

See also

System.Gadget