Posted on
7/21/2011
In order to use the browser scroll bars, edit the html page that is hosting the SL control. The Silverlight object tag is set to 100% height/width by default, and the div/body tags are set to 100% height as well.
Set the height and width of the Silverlight object to match your explicit sizes in your mainpage.xaml and you should see the browser scrollbars. Of course, only when the Silverlight page’s height and width exceeds the browsers.
<body>
<form id="form1" runat="server" style="height:100%">
<div id="silverlightControlHost">
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="775" height="650">
<param name="source" value="ClientBin/MyApplication.xap"/>
<param name="onError" value="onSilverlightError" />
<param name="background" value="white" />
<param name="minRuntimeVersion" value="4.0.50826.0" />
<param name="autoUpgrade" value="true" />
<a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50826.0" style="text-decoration:none">
<img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
</a>
</object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div>
</form>
</body>
341cbb04-285b-4085-9224-eab439ac23d1|2|3.5