Используйте свойство HtmlPage.BrowserInformation
.
Пример кода (для TextBlock
, называемого "txtOut"): -
txtOut.Text = String.Format("Name: {0}\nVersion: {1}\nProduct Name: {2}\nProduct Version: {3}\nUser Agent: {4}\nPlatform: {5}",
HtmlPage.BrowserInformation.Name,
HtmlPage.BrowserInformation.BrowserVersion,
HtmlPage.BrowserInformation.ProductName,
HtmlPage.BrowserInformation.ProductVersion,
HtmlPage.BrowserInformation.UserAgent,
HtmlPage.BrowserInformation.Platform);
У меня IE 7 и Firefox 3.6.6, и кажется, что ProductName
и, возможно, ProductVersion
будут вашим лучшим выбором для определения браузера.