Having heard about a potential Silverlight web part in SharePoint 2010, I was thinking ‘it sure would be nice to have something like that in SharePoint 2007’ A web part with no configuration of anything (except for the Silverlight MIME types) The result - the SPilverlight web part for SharePoint 2007.
Here’s how it works:
1) Get the SPilverlight.wsp file from Codeplex
2) Add the solution to your farm, and deploy it to a web application:
a) In the same directory as the one you placed the wsp file, add the solution using:
stsadm –o addsolution –name spilverlight.wsp
b) Deploy the solution to the web applicaiton using:
stsadm -o deploysolution -n spilverlight.wsp -immediate -allowgacdeployment –url http://URL_OF_WEB _APPLICATION
3) Install the SPilverlight Feature using:
stsadm –o installfeature –name spilverlight
4) Activate the spilverlight feature using:
stsadm –o activatefeature –name spilverlight –url http://URL_OF_SITE_COLLECTION
This will add the SPilverlight web part to the site collection’s web part gallery
5) Add the SPilverlight web part to a page. By default, the part will be in the Miscellaneous web part group
6) Edit the web part properties and add the path to the XAP file
The init properties property is the same as the 'param value="””/" name="”InitParams”"' element in the Silverlight object tag.
7) Enjoy the Silverlight application that you spent so much time on , now running in SharePoint.
This web part uses the createSL JavaScript method that was originally posted by Karine Bosch, and includes the Silverlight.js file that is shipped with the Microsoft Silverlight 3 Tools for Visual Studio 2008 SP1. All JavaScript is embedded in the assembly and exposed via web resources.