The Silverlight project templates in Visual Studio and other tools (such as Expression Blend) provide a default experience for users who do not have Silverlight installed. However, the current default experience is not very enticing:


Unless you modify the default experience, this image appears in place of your application for all users who do not have Silverlight installed. Unfortunately, many users will simply ignore this bare-bones request to install Silverlight, since it looks like an ad, and tells them nothing about what they will get if they install.

In almost all cases, you should provide a customized experience for users who need to install or upgrade. For example, you could indicate that installing Silverlight is quick and easy, and you could provide a screenshot of your application so that users can see what they will get.

However, there are some complexities involved if you want to create an experience that is as smooth as possible for all potential users. Specifically, there are several states that you should detect using JavaScript in order to respond appropriately. For example, you should indicate that users who are upgrading will need to restart their browsers, while users who are installing will need to refresh the page. Additionally, you should provide a different message for users on unsupported platforms and browsers.

Fortunately, the Silverlight product team has been thinking about ways to make this customization as easy as possible, and they have released their current guidance in the Silverlight Installation Experience White Paper and Sample Code.

The sample code includes HTML templates that you can modify in order to create a custom install experience with very little effort. These templates provide a preview of the default install experience that will be available in future releases of the Silverlight project templates for tools such as Visual Studio.

The HTML templates are lightweight and easy to localize, and are fully compatible with the existing Silverlight.js support file. Additionally, they provide JavaScript code that detects the browser size and modifies the experience in order to fit multiple form factors. The generic Web application template provides the following experience for full-size browser windows:


Of course, the whitepaper also provides complete guidance on customizing every aspect of the installation and upgrade experience. This is the preferred approach in order to create a fully-branded experience that transitions users seamlessly from the Silverlight installation to your running application.