Posted by: Matthew | June 6, 2008

Extended Silverlight ‘Surface’ sample

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.

Silverlight Surface sample, with enhanced Video support

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.

Advertisement

Responses

  1. +1, pal. Pretty neat.

  2. 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?

  3. 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.

  4. [...] 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 [...]

  5. Matthew, can you email me this code? Or when are you going to publish it here. It would be highly appreciated.

    Thank you!!

  6. 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.

  7. 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

  8. 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!


Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

Please log in to WordPress.com to post a comment to your blog.

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Categories

Follow

Get every new post delivered to your Inbox.