tags:

views:

36

answers:

1

I'm using Silverlight v4 on my web site. If Silverlight is not installed, I degrade gracefully by showing a static image of my own choosing. However, I don't know how to do the same if the minimum runtime version of Silverlight is not installed. If the minimum SL run time is not met, I get the Microsoft SL image, which I don't want. Here's what I'm doing inside my object tag:

<param name="minRuntimeVersion" value="4.0.50401.0" />
<param name="autoUpgrade" value="false" />
<div class="down-level">
    <a href="http://www.microsoft.com/getsilverlight/get-started/install/default.aspx"&gt;
        <img src="images/occ.png" width="262" height="117" alt="For a more dyanmic experience, click to install Silverlight"/>
    </a>
</div>

Any suggestions would be greatly appreciated. Thanks.

A: 

In this case you will have to use silverlight.js to check for the version of silverlight installed and if it is below v4 show the user your custom message (show/hide your div). If version is 4 or up you will have to create silverlight object dynamically using silverlight.js again.

How to: Add Silverlight to a Web Page by Using JavaScript
Silverlight.js Reference - IsInstalled function

Denis
Thank you. So, from looking at examples, it seems that I must move my xaml to my web app project and cannot simply reference the xap file. Is that correct? Will instantiating the silverlight object using js and xaml be slower that the method I was using using xap?
No, nothing really changes in the way you build or deploy your silverlight app. Look at the sample in "How to" reference, you should point to your xap file same way as you did it in the <object> tag.
Denis
Thank you very much.