One of the new features in Silverlight 4 is implicit styling (thank you, Microsoft!). To prevent unwanted surprises of inheritance there some limitations. It’s only possible to set the exact TargetType on a style that you wish to use. Hence it’s not possible to set TargetType to ButtonBase and let all types of buttons (Button, CheckBox, RadioButton…) implicit use the style.
One of the new controls in Silverlight 4 is a webbrowser control. The control lets you navigate to specified Uri’s and you could actually build your own Silverlight browser using the control.
But what is underneath the hood? Is it an Internet Explorer or does it use your default browser engine? Before finding the answer to this question I had a pretty good feeling about the result. To find out I constructed a very simple Silverlight application containing only the webbrowser control. I hardcoded the source of the control to http://www.b2knet.com/ – a website that can tell a little information about the browser that is used to navigate to the site.
On this computer Microsoft Internet Explorer 8.0.7600.16385 is my default browser. From http://www.b2knet.com/ I got the following result:
Browser: Microsoft Internet Explorer || Version: Mozilla 4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3)
Trying to set my default browser to Google Chrome 22.214.171.124 did not change on the result found above.
You find the Silverlight application here.