R – Silverlight BrowserInformation for Chrome and Firefox

firefoxgoogle-chromesilverlight

In our silverlight app I'm trying to determine what browser the user is running in. The silverlight runtime already helps me a bit here:

string browserName = HtmlPage.BrowserInformation.Name;

However, the browserName is 'Netscape' both under Chrome and Firefox and the same goes for the BrowserVersion property (probably because Chrome makes use of some Firefox plugin magic to make it work). I know Chrome might not be a officially supported platform for Silverlight but it almost works for us (hence the need to determine when we have to switch of certain features).

Has anyone tackled this problem? Do we need to make a javascript roundtrip to have the browsers javascript engine give us the information instead (and it that case, how)?

Best Answer

A less than robust approach could be to look in the UserAgent property for "Chrome". Seems to work on my machine, but it seems a little brittle.