To show some of the code snippets in this chapter in action, we’ll start by setting up a demonstration environment and add some test data.
Host Silverlight in SharePoint
To demonstrate the Silverlight Client Object Model, we’ll create a basic application and host it in a page on our SharePoint test site. Take the following steps:
To ensure that our Silverlight project is automatically deployed as part of our SharePoint project, let’s create a new document library in SharePoint and add the compiled output of our Silverlight project to it as part of the build process:
Element files are covered in more detail in Chapter 19. These files are used by the deployment mechanism to determine configuration settings and files that should be deployed to SharePoint when the package is installed. The additional XML that we’ve added will load SilverlightCOMDemo.xap and JScriptTest.js into our SilverlightControls document library. Of course, before we can load these files into the library we need to create them.
This command line statement will copy the .xap file that’s built by the Silverlight project into the SilverlightControls folder in our SharePoint project.
Click the Show All files icon again to hide extraneous files. Select the JScriptTest.js file, and then in the Properties pane, set the Deployment Type to ElementFile. Repeat this process for theSilverlightCOMDemo.xap file.
Using the Silverlight Web Part
Our solution will create a new document library named SilverlightControls on our test site. So that we can see our demo control, we need to host it within a SharePoint page. The easiest way to do this is to use the new Silverlight web part that’s included out-of-the-box with SharePoint 2010.
Share Point 2010 Related Interview Questions
|Web Services Interview Questions||XML Interview Questions|
|Share Point 2010 Interview Questions||ASP.NET Interview Questions|
|Share Point Administration Interview Questions||BizTalk Admin Interview Questions|
|Microsoft Office SharePoint Server (MOSS) Interview Questions||Biztalk Server Interview Questions|
|Asp Dot Net Mvc 4 Interview Questions||Biztalk Esb Toolkit Interview Questions|
|InfoPath Interview Questions|
Share Point 2010 Tutorial
The Microsoft Sharepoint 2010 Platform
Developing With Sharepoint 2010
Presentation Layer Overview
Client Object Model
Infopath Forms Services
Enterprise Content Management
User Interface Customization
Application Services Overview
Service Application Framework
Word Automation Services
Data Access Overview
Linq To Sharepoint And Spmetal
Business Connectivity Services
User Profiles And Social Data
Packaging And Deployment Model
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.