Tuesday 11 September 2012

Use a SharePoint Project to Deploy a Silverlight Application

How to add silverlight application as webpart in sharepoint 2010?

Following is the steps to add silverlight application as a webpart page.
  1. I assume that you've already created a silverlight application, Here I've created application named SampleSilverlight.
  2. Create an Empty sharepoint project by adding new project to solution.
  3. Now Add > New Item > Module and give the name SilverLight.
  4. Delete Sample.txt.
  5. On module right click and go to Properties.
  6. From Properties window select Project Output Refference.
  7. Now add new Refference by clicking on Add button.
  8. Set Deployment property as Element File and give Project Name respectively of your silverlight application.(In my case SampleSilverLight)
  9. Set relevent properties as shown in image bellow set Module URL as shown as well as File URL ,
  10. Now Right Click on Sharepoint Project and Add > New Item > Web parts 
  11. Name it properly.
  12. Delete .cs file from it.
  13. Now double click on .webpart file and set properties as shown in the image bellow,

  14.  Set URL property to relevant path as you have set in step number 9.
    OK that's it you've done with silver-light web part, build your SharePoint project and deploy it.

    You'll see your web part in custom web part groups.


No comments:

Post a Comment