This week I gave a Silverlight presentation at the Montreal .NET Community (

Very few slides and lots of code, I built live from scratch a Silverlight business oriented application with Visual Studio 2008 and Expression Blend, here is what I demoed:

  • Entity Framework over a SQL Server db (beers!)

  • LINQ

  • WCF service + asynchronous call on the Silverlight 2 client + best practice  

  • Design and Animation with Blend + a few tips (tab key to collapse windows, properties search)

  • Tips to prevent an animation from running twice

  • DataGrid templating (custom columns, custom selected row view)

  • DataBinding

  • Isolated Storage cache [Learn more]

  • Custom alternative “no Silverlight installed” version as well a as a way to simulate a user without Silverlight in IE. I finally build a nice working version of the page with data for the user without forcing him to install Silverlight. [Learn more]

  • Quickly talked about some of the new features coming with Silverlight 3 (currently beta)

Silverlight experience: Alternative ASP.NET version:

Lot’s of content! I wanted to show a bit of Silverlight 3 but that was too much.

You can download my code (*) here:

As well as the slides (french):

(*) The download include the asynchronous Database update as users edit the DataGrid.

For those of you who are interested to hear about Silverlight 3 don’t worry you still have plenty of events coming!

During my “Business oriented Silverlight 2 application” talk at DevTeach conference (december 2008) I used Visual Studio 2008 and Expression Blend to build an application that retrieves SQL server data (Beers!) through an Entity Framework model and exposes it to a Silverlight client via a WCF service and LINQ queries. I did some design and animation, added a ComboBox and DataGrid to display data and asynchronously update the model as users edit it. Then I showed how to use local cache on the client to optimize network traffic and finally applyed some Style to shape the UI.

I had only 2 slides in my ppt deck, and here is my funny slide #2:

I coded all that live on stage in 60 min without any errors!

As promised here is the source code of the application I built live:


[Beers Db by Andy Beaulieu]


Technorati Tags:

This morning I did a Silverlight 2 talk at Microsoft Montreal, during a half-day briefing called Building Compelling Websites on the Microsoft Platform.

That was a 1 hour talk to present Silverlight 2, DeepZoom, Expression Blend and create from scratch a Silverlight 2 application which consume LINQ To SQL data exposed by a WCF service with VS2008.

I would like to thank Paul Laberge for offering me the opportunity to do my very first presentation in english…

Here are the links to the online demos I showed:


Performances comparison with DHTML/Flex/SL1.0/SL2:

Free charts controls:

Medical sample (amazing) application:

Here is a link to the powerpoint slides I used:

Here is a zip file with the DeepZoom “Bill Gates” demo (hope you liked it!) and the Silverlight 2 + WCF + LINQ app I built live.

You’ll appreciate my funky UI.

For the gentleman who asked the question I couldn’t answer:

Question: “Can you customize the default Loading animation the user get while waiting for a Silverlight application to start ?”

Answer: “Yes! you can find a tutorial in the Quickstarts:

Today I had to migrate a Silverlight Alpha 1.1 project to Silverlight 2 beta 1 for a client.

As we had to expect there are a lot of changes!

First thing to notice: after installing Silverlight 2 Tools for Visual Studio 2008 you won’t be able to open your Silverlight 1.1 projects in VS2008, you have to migrate.

The best way is to create a new Silverlight application and copy your old files there, then this article will be a huge help to fix your issues:
MSDN: Breaking Changes in Silverlight 2

Here are some of the changes I had to deal with:

  • HtmlDocument.GetElementByID -> HtmlDocument.GetElementById
  • System.Windows.WebApplication.RegisterScriptableObject -> HtmlPage.RegisterScriptableObject
  • System.Windows.WebApplication -> System.Windows.Application
  • [Scriptable] attribute -> [ScriptableType] for class,  [ScriptableMember] for methods

And the one who surprised me the most: Web Services

It is said that you have to regenerate your Web Service client proxies, but when looking for “Add Web Reference” in VS2008, I don’t find it!! I just have “Add Service Reference” which is WCF for me. For ASP.NET 3.5 projects, you have both “Add Service Reference” for WCF and “Add Web Reference” for Web Services.
I know that Silverlight 2 supports both WCF and Web Services, so where the hell is “Add Web Reference” ??

Answer is: use “Add Service Reference”!
Calling a Web Service in Silverlight 2 is very similar to calling a WCF Service, that means that you have to specify binding and endpoint.

Second surprise: all web service calls must be asynchronous!
You must implement the async pattern, that surprised me at first, but now I found that this is not a bad thing and just requires 2 or 3 lines of code, so get used to it!

For syntax and code details I invite you to read this very good post :
Calling web services with Silverlight 2

Go to DinnerNow !!!

This is a great sample application which use the latest Microsoft technologies !

“DinnerNow is a fictious marketplace where customers can order food from local restaurants for delivery to their home or office. This sample is designed to demonstrate how you can develop a connected application using several new Microsoft technologies.”

And the list of technologies used is amazing :

  • Windows Communication Foundation
  • Windows Workflow Foundation
  • Windows Presentation Foundation
  • Windows CardSpace
  • Windows Powershell
  • IIS7
  • ASP.NET Ajax Extensions
  • Virtual Earth
  • Gadgets
  • Linq
  • .NET Compact Framework

The entire DinnerNow sample application can be downloaded from CodePlex :

There is also a cool video (but it breaks before the end…) :