Export (0) Print
Expand All

BrowserInformation.ProductVersion Property

Silverlight

Gets the product version number of the browser.

Namespace:  System.Windows.Browser
Assembly:  System.Windows.Browser (in System.Windows.Browser.dll)

public string ProductVersion { get; }

Property Value

Type: System.String
The product version number of the browser.

The product version number indicates the version of the browser product release. This is typically different from the BrowserVersion property value, which indicates the version of the underlying browser technology.

The value of the ProductVersion property is extracted from the UserAgent value.

The following example demonstrates how to use the BrowserInformation class.


using System;
using System.Windows.Controls;
using System.Windows.Browser;

public class Example
{
   public static void Demo(System.Windows.Controls.TextBlock outputBlock)
   {
     outputBlock.Text +=
       "\nSilverlight can provide browser information:\n" +
       "\nBrowser Name = " + HtmlPage.BrowserInformation.Name +
       "\nBrowser Version = " + HtmlPage.BrowserInformation.BrowserVersion.ToString() +
       "\nUserAgent = " + HtmlPage.BrowserInformation.UserAgent +
       "\nPlatform = " + HtmlPage.BrowserInformation.Platform +
       "\nCookiesEnabled = " + HtmlPage.BrowserInformation.CookiesEnabled.ToString() +
       "\nProductName = " + HtmlPage.BrowserInformation.ProductName.ToString() +
       "\nProductVersion = " + HtmlPage.BrowserInformation.ProductVersion.ToString();
   }
}


Silverlight

Supported in: 5, 4

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft