Presentation Code for Utilizing SharePoint 2010 DATA from SilverLight vIA The Client Object Model (COM)

Image

March 1, 2023

Thanks to everyone who attended the Lunch-n-Learn last week. As promised, the solution that I used during that demonstration is provided here.A few notes about the environment and tools that I used during the presentation.  

  • Visual Studio 2010 
  • SharePoint 2010 
  • Silverlight 4.0 (although I believe that 3.0 would work as well) 
  • Silverlight Tools for Visual Studio 2010
  • Silverlight Bing Map Control – you will need to acquire your own credentials from their website , and enter those credentials in the ContactLayout.xaml file (<m:Map Name="bingMap" CredentialsProvider="YOUR CREDENTIALS HERE" …/>)
Link to Bing Map API - https://www.bingmapsportal.com
  • Yahoo Maps API – the solution utilizes a simple call to a Yahoo Maps service to retrieve the Latitude and Longitude for a given location. You will need a Yahoo Maps key to make this service call. You can enter you key in the App.xaml.cs file, under the mapId property.

The solution is far from production worthy, but should be sufficient to demonstrate and recreate the features being presented last week.  

Additionally, you will need to create a SharePoint list from which you will pull the data. The list that I created is named “Silverlight_Demo Contacts”. You can name your list whatever you like, but the code in MainPage.xaml.cs will need to be modified to match the name of your list.  

If you use the Contact template to create that list, then most of the columns being pulled via the Client Object Model will already exist. I added an additional column for the comments, but you can find that pretty easily in the Silverlight code, and add that column to your list.

Thanks for attending, and if you have any questions feel free to email me at DavidCottle@deliveron.com.