Carlos Femmers Blog

Carlos Femmer lives in Lafayette, LA and builds a few solutions for JCLS and Agency Virtual Tours

How to add Silverlight Toolkit Controls to Visual Studio 2008 and Blend ToolBox

February 7, 2009 04:56 by carlos

I have noticed several questions regarding how to add the SL toolkit to Visual Studio 2008 or Expression Blend 2.  There are a lot of posts out there that show how to do one or another but sometimes we work in both applications and need to add it to both.  Here it goes:

 You first have to download the Silverlight Toolkit.

  1. Download the latest release of the Silverlight Toolkit -- December 2008
  2. Unzip the file and extract to a location on your OS (e.g. D:\Projects\Silverlight\Source\Silverlight Toolkit\December 2008

How to add the Silverlight Toolkit to Visual Studio 2008 Toolbox

Note: You can add the controls anywhere in the Toolbox.  I will create a new tab (Silverlight Toolkit) for this example.

  1. Right click in the Toolbox and select Add Tab then name it Silverlight Toolkit.
  2. Right click in the empty space of the Silverlight Toolkit Tab and select choose items.
  3. Select the Silverlight Components tab.
  4. Click Browse then browse to \Binaries folder and add Microsoft.Windows.Controls.Input and Microsoft.Windows.Controls.DataVisualization
  5. The controls will now appear in your Toolbox.

          

Adding the Silverlight Control Toolkit to Expression Blend Asset Library

It is now easier to add to Blend, even though you have to repeat this process for every project.  When you make controls available in Blend you need to add references to your project, which increases your download size. 

  1. In the Project Pane -- right click on References then select Add Reference.
  2. Add references to Microsoft.Windows.Controls, Microsoft.Windows.Controls.DataVisualization, Microsoft.Windows.Controls.Input.
  3. The controls will now appear in the Custom Controls section of the asset library.

This is a list of what is in each assembly:

Microsoft.Windows.Controls

  • AutoCompleteBox
  • DockPanel
  • Expander
  • HeaderedContentControl
  • HeaderedItemsControls
  • Label
  • TreeView
  • TreeViewItem
  • Viewbox
  • WrapPanel

Microsoft.Windows.Controls.Input

  • ButtonSpinner
  • NumericUpDown

Microsoft.Windows.Controls.DataVisualization

  • Charting (with associated Axis, DataPoint and Series

You can find good support for the Silverlight Toolkit on the forums for Silverlight.Net.

         

 


Silverlight 2 Controls - Source Code - Published

January 8, 2009 04:54 by carlos

The source code for the Silverlight 2 controls was published.  This is the source code for the controls as shipped in the runtime and SDK.  Here is a snapshot of the project:

 The source code for the Silverlight 2 controls includes implementations for the following controls:

  • ButtonBase
  • Button
  • HyperlinkButton
  • CheckBox
  • RadioButton
  • CheckBox
  • ToogleButton
  • RepeatButton
  • RangeBase
  • Slider
  • ScrollBar
  • ProgressBar
  • Calendar
  • DataGrid
  • DatePicker
  • GridSplitter
  • TabControl

Unit tests for the SDK controls have also been included as well!  Very cool! 

You can download it from here: Source code for Silverlight 2 Controls