Archive for July, 2009

Setting Dimensions to Auto Programmatically (C#)

I spent ages looking for an Auto object!

RectMouseOver.Width = double.NaN;

I guess this is logical as a dimension is either a number or Auto. So setting it to NaN switches it to the default of Auto.

Cool site using interactive video.

SiteXperiment

http://www.xperiment.ca/

Introduction to Silverlight

I had to give some Silverlight training recently so made a little tutorial.  Might come in handy if you need a quick into to Silverlight but it’s not very in depth.

Here’s the PDF

SilverlightTraining

And the Expression Design graphic that goes with it.

Eyeball

Silverlight 2 Style Resources are a Big Headache

Silverlight 2 forces you to store your styles in the app.xaml for each project.  This confuses Blend when you have a multiple project solution and means you have to duplicate styles across the projects.

Thankfully Silverlight 3 solves this by allowing style to be saved in a separate file.

I’ll soon be working on a big Silverlight 3 project and will get the chance to see if it’s a good system.  However it will still leave some problems.

For example button styles that use a content presenter will not be able to access properties of the items within.  For example making the text change colour or bold on mouse over.

We’ll see how it goes!