IsVersionSupported Method

Determines whether the existing Silverlight plug-in is a matching version or is a compatible version with a specified version string.

XAML
Cannot use methods in XAML.
Scripting
retval = silverlightObject.IsVersionSupported(versionString)

Parameters

versionString

string

A string that represents the version to check against the Silverlight plug-in.

Return Value

Boolean

true if the existing Silverlight plug-in is a matching version or is a compatible version with a specified version string; otherwise, false.

Remarks

The format of the version string contains four integer values that are separated by dots, for example, "1.0.50232.0". The sequence of integers represent the following version values:

  • major - the major number
  • minor - the minor number
  • build - the build number
  • revision - the revision number

This method primarily supports the JavaScript helper method IsInstalled, which is defined in Silverlight.js. Once you have an instantiated Silverlight plug-in that is displaying content, checking the installed version is of lesser importance. The main reason you typically need to know the installed Silverlight plug-in version is to change the information that is displayed to the user prior to instantiating a control with content in your HTML, and/or to anticipate whether your HTML page users will see Silverlight update or install UI based on the installed plug-in version versus what you are passing as "version" in the CreateObject method call. For more information, see Instantiating a Silverlight Plug-in (Using CreateSilverlight.js and Silverlight.js).

Applies To

Silverlight Plug-in

See Also

Silverlight Object Models and Scripting to the Silverlight Plug-in
Referencing and Modifying Silverlight Objects