Stepping into Silverlight…

Well, I’ve decided it’s time to learn to use Silverlight.  I’m installing the Silverlight 2.0 and latest Blend software (along with Zoom) to run it.

This will be my first step into XAML/WPF.  If anyone has some good reading recommendations or tutorials worth going through, email me or post me some links here.

 

UPDATE: wow.  ok, I started in on some tutorials.  Silverlight/Blend/VS 2008 actually make a good combination.  I still don’t like that I can’t use Blend ‘inside’ VS 2008 – or that VS doesn’t just include this functionality (it’s silly to be popping back and forth between the two).  (Blend isn’t really needed, but it just makes it easier at times).

So, Silverlight isn’t really that difficult at all  🙂  I’m having fun with it.  I did create a DeepZoom test, I have a map from a flight combat sim game and I wanted to try out the Deep Zoom composer – it basically takes an image and adds zooming scrolling capability to it.  Here is an example:

Kuban Zoom Test

Secondly, I create a sample after listening to this 15 minute video of a Silverlight/WCF/LINQ to SQL control that queries one of my database tables.  Not too shabby – it helps that they have included the Datagrid in Silverlight 2.0. 

The download of Silverlight is extremely small – I’m impressed they can stuff that much ‘.net framework’ into such a small download….  🙂

 

UPDATE 2: Some very important tips to using LINQ to SQL with Silverlight (ie mostly for updates – since it’s disconnected with the WCF/WebServices)

1. unless you roll your own, you will have to add a timestamp column to your database tables… (yikes)

2. make sure you set that timestamp field to “Update Check” = “Always”

3. Use the following to ‘attach/refresh’

public void Update(Customer customer) { NorthwindDataContext context = new NorthwindDataContext(); context.Attach(customer); context.Refresh(RefreshMode.KeepCurrentValues, customer); context.SubmitChanges(); }

4. Lastly – and very important – click on the LINQ to SQL designer and set the ‘Serialization Mode’ to Unidirectional

Thought I’d share these pain points – all to get the disconnected, WCF, with Linq to Sql working with Silverlight  🙂

Advertisements

Leave a Reply

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

WordPress.com Logo

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

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s