
Creating a Silverlight Web Part
❘
395
Note that there are actually a couple of small bugs in the sample application that Visual
Studio catches but Expression Blend does not. In the
ContactsViewSampleDataModel.xaml
fi le, there are actually two records with the
Name=”Adams, Terry”. To fi x this, delete the
Contacts_ViewModels:ContactViewModel node that this duplicate record is in or change
the
Name property to something unique. Also there is a missing assembly reference. Add a
reference to
System.Windows.Controls.Data.Input.
Figure 14-9 shows the Silverlight applications looks the same in the Visual Studio designer.
FIGURE 149
2. Delete the web project. You will be using SharePoint as the Silverlight host, so you will not
need the web project that was included as part of the sample. Right-click the web project and
click Remove. Click OK to verify.
3. Add a blank SharePoint project. Right-click the solution node in the Solution Explorer and
click Add ➪ New ➪ Project from the context menu. Click the SharePoint node in the New
Project dialog. Visual Studio ships with a number of SharePoint project templates. You can
see the complete list in Figure 14-10. Name the project ContactsSharePointProject. Click OK
to create the project.
584644c14.indd 395584644c14.indd 395 10/27/10 11:44:06 AM10/27/10 11:44:06 AM