VisualTreeHelper is a Spy's best friend
As you probably are aware by now, Silverlight 2 Beta 2 is upon us with quite a few modifications I might add. I am busy migrating Silverlight Spy to Beta 2 and discovered this nice little class called VisualTreeHelper (available in System.Windows.Media). VisualTreeHelper provides all the information required to walk up and down the visual object tree of a Silverlight application.
Silverlight Spy includes a XAML explorer which provides an interactive treeview of the object's tree. In Beta 1 I had to jump some loops to generate the object tree and unfortunately it didn't provide a 100% correct representation. Now with mister VisualTreeHelper it seems I can generate a complete and correct tree of any Silverlight application. Great stuff!
Silverlight Spy 2 for Beta 2 will be released shortly.
1 Comment
Sieto said:
Never seen somebody so happy he could throw away his code :)

