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.


    <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="" style="text-decoration:none">
               <img src="" alt="Get Microsoft Silverlight" style="border-style:none"/>
        </object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div>

Comments (1) -

Sentimanchos France on 10/23/2012 1:56 AM
Spot on with this write-up, I actually think this web site needs much more consideration. I’ll probably be again to learn way more, thanks for that info.

Add comment

  Country flag

  • Comment
  • Preview