This project is read-only.

About Generic Silverlight Host WebPart

SharePoint and Silverlight when combined together provide a powerful platform for building Rich Internet Applications. The Generic Silverlight WebPart was inspired by the need to aovid going back to the SharePoint administrator and begging for a new webpart to be deployed each time you wanted to host some silverlight content. The focus was also on improving the user experience while editing the initialization parameters. A custom popup dialog has been provided to where an user can edit a comma separated string to specify the initializaiton parameters. Additionally, there is also a popup dialog that renders a Silverlight user interface to let the user edit the initialization parameters in a Grid like interface.

Quick Install Guide

  • If not done already, please add a MIME type entry for .XAP file extension as described in the section below.
  • Download SharePointSilverlightHosting.wsp
  • Use stsadm -o addsolution -filename {path to SharePointSilverlightHosting.wsp} , followed by deployment to the web application of your choice using Central Administration or stsadm .
  • As an example, I have provided a dummy HelloWorld.xap to help you test the deployment. This could be any Silverlight Application
  • Download HelloWorld.xapfile from CodePlex and upload it to a document library in your SharePoint web site.
  • Create a webpart page and add an instance of the GenericSilverlightWebPart to the page
  • In the webpart properties pane, select the field Path to Silverlight Application and provide the relative/absolute URL to the .XAP file which you have uploaded in the previous step.
  • Select the field Initialization Parameters to provide the name-value pairs that are required for your Silverlight Application to function.

Enabling IIS to allow .XAP file types

Custom WebPart Properties

  • Plugin Width & Height - This will govern the size of the Silverlight plug-in. To control the overall surface area of the webpart, please modify the Width & Height under the Appearance category.
  • InitializatIon Parameters - You can use the popup editor OR click on the button Init Params - Advanced to edit the name-value pairs that will be fed into the Silverlight Application.

Installing the Silverview Application from MSDN

  • This is a wonderful Silverlight sample application that showcases the strengths of Silverlight & SharePoint web services
  • The original article can be accessed from the MSDN site. The compiled .XAP can also be downloaded from the Downloads section of this project.
  • Silverview uses the out of box SharePoint web services to implement a rich Explorer like user interface for navigating through document libraries.
  • To configure Silverview, the URL of the site needs to be specified whose Document libraries will be displayed within the application. This value should be specified using the SPURL init params property.
  • Example: SPURL=http://myserver/sites/SomeSite

Last edited Mar 5, 2010 at 9:21 PM by saurabh_dasgupta, version 16