How to Build a Silverlight Website

Microsoft Silverlight is a development platform used to build a wide variety of media applications. Web developers use Silverlight to embed these applications or other Silverlight-based media within websites. To enable Silverlight on your website, the Silverlight plug-in must first be integrated into your site. This can be done by adding HTML code to your website's existing HTML documents. Completing this task will require experience in editing HTML documents and accessing documents within a webhost.

Things You'll Need

  • WYSIWYG web editor (optional)
Show More

Instructions

    • 1

      Open the HTML document that corresponds to the page you wish to add Silverlight to. Depending on the web hosting service you use, you may be able to access this page within your user control panel. Alternatively, you can edit the HTML document within your preferred WYSIWYG editor.

    • 2

      Paste the following HTML code into your website's HTML document:

      <object width="300" height="300"

      data="data:application/x-silverlight-2,"

      type="application/x-silverlight-2" >

      <param name="source" value="SilverlightApplication1.xap"/>

      </object>

    • 3

      Insert the following code after the code from step 2. This code will display an alternate message in the instance that a user does not have Silverlight installed.

      <object id="SilverlightPlugin1" width="300" height="300"

      data="data:application/x-silverlight-2,"

      type="application/x-silverlight-2" >

      <param name="source" value="SilverlightApplication1.xap"/>

      <!-- Display installation image. -->

      <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50401.0"

      style="text-decoration: none;">

      <img src="http://go.microsoft.com/fwlink/?LinkId=161376"

      alt="Get Microsoft Silverlight"

      style="border-style: none"/>

      </a>

      </object>

    • 4

      Save the changes to the HTML document. Refresh the website within your internet browser to confirm that the Silverlight object has been added in correctly.

Tips & Warnings

  • To see an example of a complete HTML document using the Silverlight plug-in, visit the MSDN Library link listed in the Reference links. This example will be very useful for getting an idea of what your own HTML should look like.

Related Searches:

References

Comments

You May Also Like

Related Ads

Featured