Most people will be aware of Microsoft Surface, the multi-touch, table top computer. As a learning aid for Silverlight, I was looking for a great sample project to look at. This is when I came across the Silverlight Surface sample available from Microsoft (take a look here).
So, my aim was to learn from the code and improve on it where I could.
With a strict time limit of one (very wet!) weekend, I extended it by:
- Adding support for Video items,
- List of Photo’s and Videos to show are retrieved by call to server, leveraging LINQ-to-SQL,
- Items can have captions,
- Improved code structure.
Click on the image above, or click hereto go to the online version. I will be making the code available too … it’s a great way to learn. I’ve been involved with more ASP.NET applications in recent years than Windows Forms.
What struck me most was how much I really missed the rich, state-ful experience that Windows Forms provides. Now that the same experience is available through a browser using Silverlight, is simply fantastic.
UPDATE: With the recent release of Silverlight Beta 2, this sample has now been updated. If you have problems viewing it, just make sure that you have the latest version installed on your machine.
UPDATE: Thanks to all those that requested the source code for this. I’m pleased to say that it is now (finally) available for download from www.pureblue.co.nz.
UPDATE: With the final release of Silverlight 2.0, the code and demo site has now been updated.

+1, pal. Pretty neat.
By: hmmm on June 6, 2008
at 6:04 am
Hi.
I tried that sample, too, and made the the little squares for the photos barely visible. I created a similar mini-application using JavaScript and Ajax a year ago, and I’m in the process of merging the two.
I’d like to add sound and spoken text to my application, but I haven’t been happy with my results so far. Any suggestions?
By: Lynn Marentette on June 6, 2008
at 10:31 pm
Hi Lynn,
I’m impressed that you have made a javascript and AJAX equivalent, that’s some achievement! I would expect that it is a lot easier working with the Silverlight model, at least to get reliable results across different browsers.
To add sound (using Silverlight) you would use the MediaElement, just as you would for video. (You wouldn’t need to have it display if you didn’t want to). WMA and MP3 are supported so you should be sorted.
Hope that helped.
By: matthewtester on June 6, 2008
at 10:50 pm
[...] that anyone who has written samples or projects with Beta 1 has a bit of work to do. Upgrading my Silverlight Surface sample was pain-free, but that was because the code was fairly [...]
By: Silverlight Beta 2 available « Pure Blue on June 16, 2008
at 12:27 am
Matthew, can you email me this code? Or when are you going to publish it here. It would be highly appreciated.
Thank you!!
By: Yendi on July 30, 2008
at 6:53 pm
Hi Yendi, yes, I still intend to publish the code but I’ve wanted to do a little clean-up first. However, I’ve no problem emailing you what I have now, so I’ll try to get that to you in the next day or so.
By: matthewtester on July 30, 2008
at 8:33 pm
i would also like the code for this one. it’s so much better with the captions. can you e-mail it to me if it’s not too much trouble?
thanks in advance Matthew
By: marin on September 4, 2008
at 9:51 am
Terrific work mathew, if you would not mind please email me the code sample as well and no worries on the cleaned up version! Thank you again I really appreciate it!
By: Christopher on October 17, 2008
at 2:28 am