Issue with Silverlight Application Visibility on a form. RRS feed

  • Question

  • Hi Chaps,

    I was wondering if anyone has experienced my issue before and has a solution. Allow me to explain because you might already be thinking I know how to get a Silverlight Application visible on the form!

    The Issue

    I have created a Silverlight Application and popped it on to a new entities form. When running tests the application starts up fine and displays correctly on the CRM form. To tidy things up I wanted to hide the section the silverlight resource is contained within until a certain bit field is checked. I wrote onload and onchange JavaScript to hide and show the section and everything still worked ok. Well I say ok... apart from one small issue. The form loaded up as usual and then hide everything. This produced a horrible flicker while the form was loading.

    To sort the flicker out I altered the properties of the section to not be visible by default. Well when I did this the hide and show of the section still worked fine but the silverlight application wasn't visible when the section was shown! Now I know the section is being displayed because I can see the section title and using IE dev tools I can see the code for the silverlight application... but I can't see a visual of the app :(

    Everything has been developed by the book. IE the JavaScript is all supported and the silverlight application is perfectly fine. To me it seems like the silverlight app doesn't get loaded if the section isn't visible by default and using setVisible(true) on a section isn't enough to kick off the silverlight app.

    Has anyone seen this?

    Steps to Reproduce

    • Place Silverlight XAP file on to a form in a section.
    • Alter the section to not be visible by default.
    • Onload run JScript to make the section visible .
    • You will not see your silverlight application even though you can see the section.

    You can work directly with the resource instead of the section. It produces the same result.

    Kind Regards,

    My MSCRM Blog / Website
    Follow me as CRM Codex on Twitter
    Follow me as TSG on Twitter
    Follow me on LinkedIn

    Tuesday, March 20, 2012 8:16 PM

All replies

  • I have the same issue. If the section is NOT visible by default and then in onload jscript, I show the section, it's OK but the silverlight component in that section is NOT loaded! I could re-produce the issue with just a simple silverlight webresource (with 1 label). Thanks
    • Edited by NGMKha Tuesday, November 27, 2012 5:06 AM
    Tuesday, November 27, 2012 4:46 AM
  • I found out the problem, I think it's a bug in CRM. In my onload, I add it

    var s = document.getElementById("WebResource_silverlight");

    s.style.height = "100%"

    and then it's visible again :)

    • Proposed as answer by NGMKha Tuesday, November 27, 2012 7:35 AM
    Tuesday, November 27, 2012 7:34 AM