Share via


Building Silverlight Custom Field Controls

Version: 1.0.0

Description

SharePoint ships with thirteen supported field types out of the box, but one of its key strengths is the ability to add custom field types if the out of the box ones don't meet your need. If one of the needs that are not met is a custom display of the data, then a Silverlight custom field control might be the solution. Adding Silverlight's rich UI capabilities, along with the managed code and off-server client object model code, can produce a compelling user experience.

Overview

SharePoint ships with thirteen supported field types out of the box, but one of its key strengths is the ability to add custom field types if the out of the box ones don’t meet your need. If one of the needs that are not met is a custom display of the data, then a Silverlight custom field control might be the solution. Adding Silverlight’s rich UI capabilities, along with the managed code and off-server client object model code, can produce a compelling user experience.

Objectives

This lab will demonstrate how to build a custom SharePoint field control that uses a Silverlight application to provide the end user display. Specifically, you will

  • Build a custom SharePoint field control
  • Add a Silverlight user interface
  • Add the code to interact with the SharePoint list

System Requirements

You must have the following items to complete this lab:

  • 2010 Information Worker Demonstration and Evaluation Virtual Machine
  • Microsoft Visual Studio 2010
  • Silverlight 4
  • Silverlight web part extension for Visual Studio
  • Silverlight 4 Toolkit

Setup

You must perform the following steps to prepare your computer for this lab...

  1. Download the 2010 Information Worker Demonstration and Evaluation Virtual Machine and create the Hyper-V image.
  2. Install the Visual Studio 2010 Silverlight Web Part. The Silverlight Web Part is an add-on to Visual Studio 2010.
  3. Ensure that the latest version of Silverlight 4 is installed.
  4. Install the Silverlight 4 Toolkit.
  5. Run the SetupLab.cmd file from the <install>\Labs\BuildingSilverlightCustomFieldControls\Source\Begin folder to establish the SharePoint environment necessary for this lab

Exercises

This Hands-On Lab comprises the following exercises:

  1. Building the Custom field control
  2. Adding the Silverlight control
  3. Interacting with SharePoint

Estimated time to complete this lab: 45 minutes.

Starting Materials

This Hands-On Lab includes the following starting materials.

  • Visual Studio solutions. The lab provides the following Visual Studio solutions that you can use as starting point for the exercises.
    • <install>\Labs\BuildingSilverlightCustomFieldControls\Source\Begin\SLNavigation\SLFieldControl.sln: This solution contains the beginnings of a SharePoint custom field control. You will finish off the field control and add the Silverlight application.
    Note:
    Inside each exercise folder, you will find an end folder containing a solution with the completed lab exercise.