Creating a Silverlight web part
In this recipe we will create a Silverlight application that retrieves data from the contacts list that we used in Chapter 1.
Getting ready
The previous recipes should be completed successfully so that you understand the concept of a web part and its deployment. Apart from that, create a new document library on your site using SharePoint UI and name it XAPFiles
.
How to do it...
If you have closed Visual Studio IDE, launch it as an administrator.
Create a new empty SharePoint project called SilverlightOM. Take defaults on the next steps of the wizard.
To this solution add a new Silverlight application project and name it ContactsListSilverlight.
Now to your empty SharePoint project, add a new module and name it XAPFiles.
Delete the
Sample.txt
file it adds to the module. TheElements.xml
file will be automatically updated by VS 2010.In the Properties window for this module, click on the ellipsis (…) for Project Output References as shown in the following screenshot...