BrowserInformation.BrowserVersion Property

Silverlight

Gets the version of the browser technology that the current browser is based on.

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

public Version BrowserVersion { get; }

Property Value

Type: System.Version
The version of the underlying browser technology.

The browser technology version is typically different from the browser product version. To get the product version, use the ProductVersion property.

This property corresponds to the Navigator.appVersion property of the browser.

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, 3

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

Community Additions

ADD
Show: