Add Silverlight to a page using the Silverlight Web Part

You can deliver Silverlight applications and videos from a site page by using the Silverlight Web Part. The Silverlight Web Part acts as a host for the Silverlight application.

Users must have the Silverlight plug-in installed on their computers to run Silverlight applications. An administrator can configure a setting that prompts users who do not have the Silverlight plug-in to download and install it.

To add a Silverlight Web Part to a page, you must have at least the permissions (permissions: The specific security settings that allow or restrict access to a given item, list, library, or site.) associated with the default <Site Name> Members security group for the site.

In this article


Use the Silverlight Web Part

Publishing a Silverlight application to your site is easy. However, to make sure that the Silverlight Web Part functions correctly, you should complete these steps before you add a Silverlight application to your site.

  1. Locate the XAP File A XAP file contains all the core application files for a Silverlight application. for the Silverlight applications that you want to publish. You must save this file to a network location that can be accessed from your site by using a URL, such as a library on your site.

 Note    It is possible to run third-party Silverlight applications from your site. For example, you could embed a Newsfeed from MSN in your site. However, before you can do this, a site administrator must add the URL for the Newsfeed to the list of trusted applications for the site.

  1. Test the application to make sure that it runs correctly from the network location where you stored it. An XAP file can be configured by the developer to refer to external files. If this is the case, you must make sure these external files are also available from the network location where you stored the XAP file for the application to work.
  2. Copy the URL for the network location where the XAP file is stored. You must reference this location when uploading the application to the Silverlight Web Part. You cannot browse to the location from the Web Part interface so that you should have the location reference easily available before you start.

Top of Page Top of Page

Add a Silverlight application to a page

  1. From a page, in the Ribbon, click the Page tab, and then click the Edit command.

 Note    If the edit command is disabled, you may not have the permissions to edit the page. Contact your administrator.

  1. Click on the page where you want to display a Silverlight application, click the Insert tab, and then click Web Part.
  2. Under Categories, select Media and Content, under Web Parts, click Silverlight Web Part, and then click Add. When you select a Web Part, information about the Web Part is displayed in the About this Web Part column.
  3. Enter the URL (XAP Source Location) for the Silverlight application package that you want to use, and then click OK. If the Silverlight application does not appear in the Web Part, make sure that the location that you specified for the XAP file is accurate. This problem is usually due to the Web Part not finding the application.

 Note    After you have added the Silverlight application to the page, it is a good idea to test the different controls of the Silverlight application to make sure that they work.

Top of Page Top of Page

Modify the display of the Silverlight Web Part

After you add a Silverlight application to a page, you can edit the Web Part to change how it displays the application. To edit the Silverlight Web Part:

  1. Point to the Web Part, click the down arrow, and then click Edit Web Part. The Silverlight Web Part properties display in the tool pane.
  2. Make changes in one or more of the following categories of properties:
  • Application      Use this setting to change the Silverlight application that is displayed in the Web Part. Click Configure, enter the URL where the XAP file is located, and then click OK.
  • Appearance      Use these settings to adjust the appearance of the Web Part itself. You can change the title, height, width, and chrome (the design and navigation elements that frame the Web Part) of the Web Part by changing these settings.
  • Layout      Use these settings to adjust the layout of the Web Part. You can change whether the Web Part is visible, whether it is directional (left-to-right, right-to-left, or neither), which zone the Web Part appears in (top, left column, or right column), and the zone index of the Web Part.
  • Advanced      Use these settings to configure the advanced Web Part options.
  • Other Settings    Use this setting to set the Custom Initialization Parameters for the Silverlight application. To determine whether you must establish this setting for your Silverlight application and what setting that you must have, see the instructions that are included with the Silverlight application.
Top of Page Top of Page

Remove the Silverlight Web Part form a page

  1. From a page, in the Ribbon, click the Page tab, and then click the Edit command.

Image: Edit command of the Edit tab

 Note    If the Edit command is disabled, you may not have the permissions to edit the page. Contact your administrator.

  1. On the page, point to the Silverlight Web Part, click the down arrow, click Delete, and then click OK.

Top of Page Top of Page

 
 
Applies to:
SharePoint Foundation 2010 , SharePoint Server 2010