Hosting the Silverlight Application in SharePoint 2010

The Silverlight application created in the previous section was hosted on an ASP.NET page, but we now want to host the Silverlight application on a SharePoint site. Hosting a Silverlight application involves two steps:

1. Deploy the XAP file either to some folder in <14 Hive>, ideally the Layouts folder, or to some document library in the SharePoint site.

2. Reference the XAP file in the out of the box Silverlight web part or some custom web part.

Add a new Empty SharePoint project to the HelloWorldSLApp solution and name it HelloWorldSLDeploy. Right-click the SharePoint project and click Add, SharePoint “Layouts” Mapped Folder. The Layouts folder gets added to the Project. A subfolder HelloWorldSLDeploy ...

Get Sams Teach Yourself SharePoint® 2010 Development in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.