Silverlight 2 Unleashed: Code

About the code

You will find Silverlight 2 Unleashed source code here under. The project file SampleCode contains loose code samples that don't belong to an application. Where available, each sample code file is named according to the listing number in the book.

Other projects are available for each chapter. These files contain complete executable applications. Unzip the file to a folder on your hard disk and open the Solution file (*.SLN) in Visual Studio 2008 with Silverlight tools installed

Note: The project files (*.CSPROJ) and solution files (*.SLN) are for Visual Studio 2008.

Another Note: My technical editor J Boyd Nolan is currently translating the source code files from C# to VB.NET. Some chapters are not available yet and will progressively be added.

Download the source code

  • (C#) "Loose" sample code for all chapters
  • (C#) All chapters (39 MB)

Chapter 5 - Using Media

  • (C# | VB) Thumbnails Application

Chapter 6 - Blending a Little More

  • (C#) Creating An Opacity Mask (Linear)
  • (C#) Creating An Opacity Mask (Radial)
  • (C#) DatePicker Control
  • (C# | VB) Thumbnails Application

Chapter 7 - Deploying to a Web Page

  • (C#) Test Object Tag
  • (C#) Silverlight Book Cover

Chapter 8 - Programming Silverlight with JavaScript

  • (C#) Silverlight Book Cover

Chapter 9 - Understanding .NET

  • (C# | VB) My First Silverlight

Chapter 10 - Progressing with .NET

  • (C# | VB) Thumbnails Application

Chapter 11 - Progressing with Animations

  • (C#) Animation In Blend
  • (C#) Point Animation Test
  • (C#) Starting And Stopping The Animation
  • (C#) Thumbnails Application

Chapter 13 - Progressing with Videos

  • (C#) Letting Your Users Choose The Player
  • (C#) Firing Script Commands
  • (C#) Expression Full Screen

Chapter 14 - Letting .NET and JavaScript Talk

  • (C#) JavaScriptDotNet Application
  • (C#) Thumbnails Application

Chapter 15 - Digging into Silverlight Elements

  • (C#) Canvas Drag
  • (C#) Using StackPanel For Flow Layout
  • (C#) Grid Layout Test

Chapter 16 - Digging Deeper Into Silverlight Elements

  • (C#) Dragging A Thumb
  • (C#) Using A GridSplitter
  • (C#) DatePicker Catching Errors
  • (C#) SilverlightDraw Application

Chapter 17 - Using Resources, Styling, and Templating

  • (C#) Creating A Style In Blend
  • (C#) Priority Of Property Setters
  • (C#) Templating The Lookless Control
  • (C#) Thumbnails Application

Chapter 18 - Data Binding and Using Data Controls

  • (C#) SilverlightDraw Application
  • (C#) SilverlightDraw Application (DataContext)
  • (C#) Color Chooser ListBox
  • (C#) Color Chooser DataGrid 1
  • (C#) Color Chooser DataGrid 2 (RowDetails)
  • (C#) Color Chooser DataGrid 3 (Refining The Columns)
  • (C#) Color Chooser DataGrid 4 (Editing Elements)

Chapter 19 - Creating User Controls and Custom Controls

  • (C#) Thumbnails Application

Chapter 20 - Taking Silverlight 2 One Step Further

  • (C#) Thumbnails Application
  • (C#) Simple User Login
  • (C#) Application Object

Chapter 21 - Taking Silverlight 2 Even Further

  • (C#) JavaScriptDotNet Application

Chapter 22 - Connecting to the Web

  • (C#) Thumbnails Application (Creating And Loading An XML File)
  • (C#) Thumbnails Application (Loading A Zip File And Showing Progress)
  • (C#) Thumbnails Application (Making Requests To WCF Services)

Chapter 23 - Placing Cross-domain Requests and Handling Exceptions

  • (C#) Thumbnails Application

Chapter 24 - Silverlight: Continuing the Journey

  • (C#) Updating A Service Reference
  • (C#) Data Binding Silverlight
  • (C#) Binding To An Object Rather Than A Property
  • (C#) SilverlightDraw Application
  • (C#) Test Media Player