When I first learned about Silverlight I thought it would be compiled
into a package rather like Flash does with an SWF file. While it is not
impossible to decompile a Flash file and many tools exist to assist
you, it does help to ensure that only the most determined individuals
can find out how you made that effect and use it on their own site.
With Silverlight, all you need is something like Firebug and
you can easily locate and download the xaml files, and of course a
simple View Source reveals where all the JavaScript is. What this means
is that if you visit the Silverlight Showcase,
find an example that has a player skin you really like, but you are not
a designer and couldn't recreate it yourself, or one that does
something that you cannot find "how to" examples of anywhere, you can
peek under the hood and find out on your own.
All you need to do is this:
- Open Firebug
- Look at the rendered HTML
- Find the object tag with a type of "application/x-silverlight"
- Look at the "Source" Parameter and then type it into the address bar.
For
Example, the Fox movies demo has a source of "XAML/player.xaml" so
typing http://silverlight.net/fox/XAML/player.xaml into your browser
will bring up the xaml file, that you can download and open in the
editor of your choice. That xaml contains links to the external
graphics and you can use the same technique to grab them from the site
e.g. http://silverlight.net/fox/images/logobg.png.
Download the Javascript files listed in the <HEAD> section,
arrange it all into the same folder structure as it was on the server.
Finally create a new silverlight project in Blend, replace the
page.xaml with the contents of player.xaml and you have an excellent
starting point for your own site.
Silverlight 1.1 sites are a little more complex. Luckily, someone has written an add-in for Lutz Roeder's Reflector that should make it easier.
Obviously you should respect their copyrights and not simply reuse
their code and graphics, but my point is that here in the early days of
Silverlight, while most of us are floundering around in the dark - very
few Silverlight books
have been published at the time of writing - the showcase offers us not
only inspiration on what can be produced with Silverlight, but gives us
everyting we need to see how it was done, so that we as developers can
take it to the next level in our own Silverlight applications.