Export (0) Print
Expand All

BrowserInformation.ProductName Property

Silverlight

Gets the product name of the browser.

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

public string ProductName { get; }

Property Value

Type: System.String
The product name of the browser.

The browser product name is the familiar name of the browser, such as "FireFox". This name is typically different from the Name property value, which indicates the name of the underlying browser technology, such as "Netscape".

The value of the ProductName 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