Steven Nagy .NET

Sunday, 20 May 2007

Silverlight: TicTacToe final

I've posted version 3 (final) of TicTacToe for your reference. Demo and source code is all available.

I've tidied up the UI so it doesn't like totally n00bish. I've removed the winning line and incorporated some animations (otherwise, what's the point right?) .

It's been a good experience and a good tool for learning the new framework and capabilities. Here's a summary:
  • Not all XAML elements will work in Silverlight. For example, in Expression Design I created a CROSS and gave it a bevel. This renders with a Bitmap render expression in the Xaml but it causes runtime exceptions in silverlight... so no bevels!
  • Grouping your objects into canvas' helps management of those objects. In TicTacToe, once I started grouping and hooking up events on the canvas that groups the objects rather than the objects themselves, things became easier.
  • If trying to accomplish something in managed code, checkout the WPF reference on MS site. Although the code won't be identical for Silverlight, it will open up your eyes how to approach your problems.

My next Silverlight project will be something more interactive, flamboyant, and functional. This means it will be a bigger project as well; hopefully my trial versions of Blend and Design won't expire! Any suggestions welcome.

In the meantime, I'll also look at writing a Vista gadget and posting that code as well. I attended a demo from Scott Barnes the other night. He had some technical difficulties, but it looks extremely easy to create gadgets.

Labels: , , , , ,