Chapter 10: Designing Silverlight Applications

289

<param name="minRuntimeVersion" value="3.0.40818.0" /> <param name="autoUpgrade" value="true" />

<a

href="http://go.microsoft.com/fwlink/?LinkID=149156&v=3.0.40818.0" style="text-decoration:none">

<img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>

</a>

</object>

<iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px">

</iframe>

</div>

</form>

</body>

</html>

Listing 10-1 contains an object tag that hosts the Silverlight application. This object tag has various parameters, which are described in Table 10-1.

You can run the application and view the Web page, but there isn’t much to see yet. The next section starts you in the direction of making something useful happen with Silverlight by reviewing the Designer.

Parameter

Description

source

In Figure 10-2, you can see a ClientBin folder in the ASP.NET MVC Web

 

application project. When the Silverlight project builds, VS will take the output

 

of that project and place it into the ClientBin folder. The output of a compiled

 

Silverlight project is a *.xap file, which is the same as a compressed *.zip file,

 

but with a different name. Silverlight loads the *.xap file into the browser at

 

runtime and runs the application.

onerror

Listing 10-1 omitted the contents of the onSilverlightError JavaScript function,

 

which is called whenever an error occurs in Silverlight.

background

Sets the control background.

 

 

minRuntimeVersion

States that the user must have v3.0.40818.0 or later of the Silverlight plug-in for

 

this application to run. The user receives an error message if she doesn’t have

 

the minimum version.

autoUpgrade

If the user doesn’t have the minimum version, as specified in minRuntimeVersion,

 

setting this to true will prompt the user to begin the upgrade process.

 

 

Table 10-1 Object Tag Parameters for Silverlight

Page 312
Image 312
Microsoft 9GD00001 manual 289, Object Tag Parameters for Silverlight