Silverlight Spy : A Silverlight X-Ray useful tool

uk_flag_icon This is my first post for 2008. So, please let me start by wishing you all the best for this new year that I'm sure you're going to love if you're interested in RIAs, as Silverlight 2.0 is scheduled to RTM this year.

It seems that sometimes my memory is playing tricks on me. I turned 40 last summer, so it's not a big surprise that I start experiencing some effect of my aging brain ;)

I thought I already blogged and discussed about this wonderful tool that I found some time ago. Let me introduce Silverlight Spy, a tool that has to be part of the toolset of any serious Silverlight developer or hacker. If I mention that this tool comes for free, you will agree that you have no excuse.

What is it?

Silverlight Spy is a free tool that has been written by Koen Zwikstra who runs a website called FirstFloor.

Silverlight Spy is a .NET Windows Forms application that you get on your machine via a ClickOne installation. Thus,the version you run is always up-to-date.

The tools allows you to explore the interns of a Silverlight scene contained in any web page. You can explore local projet pages you're working on and also public web pages containing Silverlight. In the screen capture below, I'm exploring the well known www.Silverlight.net page.

The power of the tool comes from the right hand side tools : The XAML Explorer and also the Properties Editor. You can digg into the depth of the XAML object tree, and for every object, inspect and modify its properties. In the capture below, I've changed the Text value of a Textblock to localize it in French, from "Home" to "Maison", as an exemple. Also note the dashed surrounding box, as the one that you get in HTML pages by using the IE Dev Toolbar.

If you didn't know about this tool prior to reading this post, I strongly recommend that you give it a look.

SilverlightSpy 

french_flag_icon Ceci sera mon premier billet pour l'année 2008. Alors laissez moi commencer par vous présenter mes Meilleurs Voeux pour cette nouvelle année. Si vous vous intéressez au sujet des RIAs, je suis certain que vous allez aimer l'année 2008 puisque c'est cette année que nous verrons apparaître la version finale de Silverlight 2.0.

Il y a des moments où ma mémoire me joue des tours. J'ai franchi la barre de la quarantaine l'été dernier, et ce n'est donc pas une surprise si je commence parfois à ressentir certains effets du vieillissement de mon cerveau ;)

J'aurais pourtant juré avoir déjà mentionné et présenté cet outil sur ce blog. J'ai dû rêver. Alors laissez moi réparer cet oubli et vous présenter Silverlight Spy, un outil que je considère comme étant indispensable dans la panoplie de tout développeur Silverlight hobbyiste ou professionnel. Si en plus, j'ajoute que cet outil est gratuit, alors vous n'avez plus d'excuse !

De quoi s'agit-il ?

Silverlight Spy est un outil gratuit qui a été écrit par Koen Zwikstra, qui par ailleurs bloggue et gère un site nommé FirstFloor.

Silverlight Spy est une application .NET Windows Forms que vous installez via ClickOnce sur votre machine. Du fait, votre version est toujours à jour.

Cet outil vous permet d'explorer le contenu d'une scène Silverlight dnas une page web. Vous pouvez ainsi explorer le contenus de pages de projets locaux sur lesquels vous travaillez, mais vous pouvez également explorer le contenu de pages sur des sites publics sur le net. Dans la copie d'écran précédente, le dissèque par exemple le contenu du site www.Silverlight.net bien connu de tous.

Tout l'intérêt de l'outil vient en fait de sa partie droite, qui regroupe un Explorateur XAML et un Explorateurs de propriétés. Vosu pouvez ainsi plonger en profondeur dans l'arbre des objets XAML de la scène d'une application Silverlight, et voir ou modifier les valeurs de propriétés de ces objets. Dans la capture précédente, j'ai d'ailleurs modifié la propriété Text d'un Textblock pour localiser le "Home" en "Maison". Vous noterez l'encadrement visuel par une zone en pointillés d'objet actif, à l'instar de la fonctionnalité équivalente dans la IE Developer Toolbar.

Si vous n'aviez jamais entendu parler de Silverlight Spy avant de lire ce billet, je vous encourage vivement à passer un peu de temps à jouer avec et à le découvrir.