Issue with Silverlight Application Visibility on a MSCRM Form

As usual I have been working hard on enhancing and developing new Silverlight applications that interface with MSCRM 2011. I have come accross a weird issue that I was wondering if anyone has experienced before and maybe has a solution. It’s a rare occation that I have to seak a solution off someone else but I’m hoping for some enternal magic here! Allow me to explain, because from the title 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.

Any insight would be ace!!!

Leave a Reply

Your email address will not be published. Required fields are marked *