Social Icons

twitter google plus linkedin rss feed



Scroll bars appear in SharePoint 2010 when rendering Silverlights (Part 2)

Yes, every time you fix the height or the width of the web part it shows those ugly scrollbars.

This is not the first time I go through this, but I think this time I have solved it for good or until we get the next version of SharePoint next year…. The problem was the way I was creating the Silverlight object I was using an inline CSS style. It looked a bit like:
<object id='silverlightHost' style='height: 600px; width: 350px; margin: 0; padding: 0;' data='data:application/x-silverlight-2,' type='application/x-silverlight-2'>

After a thousand try / error experiments don’t ever think I am capable of creating a SharePoint 2010 OOTB Silverlight Web Part and copying it I changed the first line of the object to:
<object id='silverlightHost' height='600px' width='350px' data='data:application/x-silverlight-2,' type='application/x-silverlight-2' style='display:block' class='ms-dlgDisable'>
And that does the trick.

No comments:

Post a Comment