Spatacoli

Mix07 Day 1–Session 1

Building rich web experiences with Silverlight. This session was presented by Joe Stegman. Joe is an excellent presenter and I've attended many of his web casts including the Digital Black Belt series that helped prepare people for security issues with web site design. Joe was presenting Silverlight to us using the go-live loving beta of version 1.0. He made it clear that he would show us some of the stuff the Scott demonstrated in his keynote, only using the now-defunct-yet-not-released-yet version 1.0 of Silverlight.

Let me tell you, I can't wait for 1.1 to be released. The amount of JavaScript that he had to write to hook things up was a little confusing. I was actually disappointed that they continued with the XAML method of finding nodes (findName) and not the fairly standardized DOM (getElementById). But that's just a small thing and we'll all forget about it when version 1.1 is released.

Basically you include a script file and call a method to generate the Silverlight control. The Silverlight control is just a typical object tag with a type of "application/ag-plugin". For example:

<object type="application/ag-plugin">
  <param name="Source" value="somexaml.xaml" />
</object>

The script file and function you'd call would prevent IE from forcing the user to click to activate though, so you should just use that. That's all you need for Silverlight. Notice there's no requirement for adding a managed assembly to the GAC, no special web.config settings, and that's all because you don't need them. During the keynote Scott showed running a Silverlight page that pushed some video to the screen running from a web server and browser on a Mac. No Windows required.