Silverlight 3 control in a Sharepoint Webpart does not display

Answered Silverlight 3 control in a Sharepoint Webpart does not display

  • Wednesday, September 23, 2009 6:27 PM
     
     

    I have coded a simple web part and have added a simple silverlight 3 control to it using LiteralControl. The code is from Karine Bosch's blog (http://karinebosch.wordpress.com/2009/07/17/integrating-silverlight-3-in-sharepoint-2007/). The code is as is from this blog but I cannot see my silverlight control on the webpart. The mime types are fine. The silverlight control works fine when I open it in a test page. When I try and access the xap file through the browser, I get the option to download it, so it is finding the xap file. The javascript on the page shows no errors. Any ideas anyone?

All Replies

  • Thursday, September 24, 2009 12:57 PM
     
     

     Also, the sharepoint log shows no errors.

  • Thursday, September 24, 2009 3:12 PM
     
     Answered

    for anyone else who runs into this issue.. height and width... make sure you set the height and width of your div tag to be exactly that of your user control. Cannot believe I spent this much time over some thing this small.

  • Wednesday, October 07, 2009 12:53 PM
     
     

    Thanks for posting this.  I had this same issue and it took me almost 2 days to figure out why.  Possibly longer if I didn't come across this thread.  I'm not sure if it's the object tag or the Silverlight plugin itself being so picky.

  • Wednesday, October 28, 2009 9:52 AM
     
     

    Make sure both js files are in the _layouts subfolder you created. That's what worked for me.

  • Wednesday, April 06, 2011 6:37 AM
     
     

    I thought is enough to set 100% of height and widith, don't?

  • Wednesday, April 20, 2011 1:01 AM
     
     

    This type of error is come due  ur .xap file contain a space like

    Silverlight demo1.xap

    u should remove these space between the name u render it into the iframe of <object> tag

    SilverlightDemo1.xap

    and ur layout structure size of Silverlight control like width and height Should be the same as the webpart size u declare in that page.

    When u run any silverlight control or application it render it into the iframe with 100% height and width So if ur Silverlight control size is greater than the webpart size u got only some portion display on ur page

    So specify only that that much height and width to ur silverlight control u need further

    i am sure about it, it works well