Have we ever wondered how Silverlight XAML gets rendered at run time or how event works on pages and how exactly the app perform on various hardware configuration .In this post we will get introduced to a tool called SilverlightSpy which is must for all Silverlight developers.
What is Silverlight Spy and its benefits
SilverlightSpy is a propriety software tool from FirstFloor software . As of them
Silverlight Spy is a runtime inspector tool providing unprecedented access to all aspects of any Silverlight application. Explore the UI element tree, monitor events, extract XAML, interactively execute DLR code, view statistics and more, much more.
it offers ability to developers to have snoop over the XAML of app and also lots of other insight .Few of the amazing feature of silverlight spy is listed bellow
- XAML Dom Structure and Visual Tree
- Run Time UI element statistics and property
- Event Monitoring
- Performance and Statistics
Silverlight App dissection using Silverlight Spy
In this example we will examine my earlier sample application StatesOfIndia deployed over shared hosting.Before reading rest of article make sure you have downloaded the latest version of tool check with download link at end of the article.
Application Output Log
It allows us to have complete information of XAP information and communication to server .
XAML code and UI Elements
You can view the UI element tree structure on a single button click .Not only it allows us to view the details but you can change the properties at run time and can visualize the effects.
Along with XAML visual tree it allows to have the XAML code , C# code behind too with help of reflector.
It also supports logging of user interaction and keyboard mouse input.
Silverlight Spy allows you to have a close look at the resource and the memory usage of your system.
Personally I feel its amazing to analyse an application and to have a detailed the statistics .Although it is around the horizon for quite a few time , I got introduced to it recently.If you are developing a PRISM or MEF based solution then it gives you a better understanding of run time composition and UI structure.It helped me to understand the XAP download information via output logger and even to understand my own application much better at runtime.
Hope this will be helpful to you too.
Downloads and Information
SilverlightSpy is available in two version Free and Paid version can be downloaded from bellow link
Download URL -: http://firstfloorsoftware.com/silverlightspy/download-silverlight-spy/
You can compare various edition of SilverlightSpy Here.
A video introduction from developer is available at channel9 , have a look at it Here .