REMIX UK – "No Silverlight Application is an Island" Code

I’m just back from REMIX UK down in Brighton where I did a couple of sessions – one on Silverlight and another on Windows Presentation Foundation.

Thanks to all who came along and apologies if you were either chatting to me or in my session and thought that I was a little low on energy ( or coherence for that matter 🙂 ) – I picked up a cold over the previous weekend and was a bit feverish on the Thursday and the Friday. Many thanks go to the nice lady in the Boots 24 hour chemist in the middle of Brighton for selling me some “Day Nurse/Night Nurse” at 9pm on the Thursday night 🙂

I had a really strange experience in my Silverlight session in that, for the first time ever, I typed a bunch of code onto my keyboard and then looked at the display and instead of it saying something like;

string.Format(“This is a some message {0}”, someObject);

it said something like;

xydsdf.deerfds.(dfdsf, dfdsfdf) ::; ;

and I thought to myself “Uh oh, this session’s going to be a bit tricky as it seems that my fingers have stopped working!!!”. Not to worry, it all pretty much worked out in the end 🙂

Anyway, a few people asked me for the code to my Silverlight session and that’s the purpose of this post.

It’s a little difficult to share the code in some ways as I started with some pre-built projects/solutions and then added to them over time. The reason for that was that I found that if I started from scratch each time then the talk runs to about 2 hours and a lot of the pieces aren’t actually to do with Silverlight (e.g. building an ADO.NET Data Service ) and so I pre-built those pieces to cut down on the time.

So, what I’ll share here are the finished projects as I built them on-site yesterday. In many ways that’s easier for me to do as I still have them on my hard-drive from the talk.

The only project that’s a little different is the project that I used for HTML Interop because I kept changing that over time. So, what I’ve done is to include all the code with conditional compilation that highlight which piece of code was in which stage of the demo. Hopefully, you’ll be able to take it and figure it out by just uncommenting the right STAGEX where X = 0..6.

  1. Interacting with the HTML DOM and Javascript. Project download.
  2. Interacting with the local machine via the file dialog and Isolated Storage. Project download.
  3. Interacting with a SOAP based web service. Project download.
  4. Interacting with a RESTful web service. Project download ( note, there’s some small bits of SQL to run to make this one work – in a sub-folder called SQL ). Note also you’ll need the updated Silverlight client bits for ADO.NET Data Services.
  5. Interacting with RSS/ATOM. Project download ( note, I skipped by this one yesterday as I was running out of time ).
  6. Interacting with Sockets. Project download.

Note that these weren’t designed for sharing so you might have to do a bit of messing around to get them to work and the ZIP files are bigger than they should really be as I’ve bundled up what I had on my disk rather than trying to nail down exactly what is/isn’t needed.