Share via


Exercise 1: Using the Silverlight Web Part

In this exercise, you will use the Silverlight Web Part to display a Silverlight application on a SharePoint site.

Task 1 – Uploading a Silverlight Application to a SharePoint Site

In this task, you will use Internet Explorer to upload a Silverlight application to a SharePoint site.

  1. Open Internet Explorer and navigate to https://intranet.contoso.com.
  2. Click the Shared Document link to open the Shared Documents document library.
  3. Click the Add document link.
  4. Click Browse…
  5. Browse to the <INSTALL>\Labs\SilverlightWebPart\Source\End \Sample.Silverlight.App\Bin\Release folder and select the Sample.Silverlight.App.xap file.
  6. Click Open.
  7. Click OK.
  8. Click Save.
  9. Right click on the Sample.Silverlight.App document and select Copy Shortcut. The path to the Silverlight application will be used in the next task.

    Figure 1

    Copy Sample.Silverlight.App url

Task 2 – Adding the Silverlight Web Part to a Page in a SharePoint Site

In this task, you will use Internet Explorer to add a Silverlight Web Part to a page in a SharePoint site.

  1. Open Internet Explorer and navigate to https://intranet.contoso.com.
  2. Click the Edit button.

    Figure 2

    Edit Button

  3. In the Editing Tools group in the ribbon, select the Insert tab.

    Figure 3

    Insert Tab

  4. Select Web Part.
  5. In the Categories section select Media and Content.
  6. In the Web Parts section select the Silverlight Web Part.
  7. Click the Add button.
  8. When the Silverlight Web Part dialog appears, right click in the URL textbox and select Paste.

    Figure 4

    Paste Sample.Silverlight.App URL

  9. Click OK.
  10. Click the Save Button.

    Figure 5

    Save Button

  11. Notice the Silverlight Web Part displays the Silverlight.Sample.App Silverlight application on the SharePoint page.

    Figure 6

    Silverlight Sample Application into a Web Part

Exercise 1 Verification

In order to verify that you have correctly performed all steps of exercise 1, proceed as follows:

Verification 1

In this verification, you will browse to the SharePoint page where you added the Silverlight Web Part to validate it displays the Silverlight.Sample.App Silverlight application.

  1. Open Internet Explorer and navigate to https://intranet.contoso.com.
  2. Verify the Silverlight Web Part displays the Silverlight.Sample.App Silverlight application on the SharePoint page.

    Figure 7

    Silverlight Sample Application into a Web Part