Using the WPF Tree Visualizer
Versions: 2010
Published: 1/29/2010
Code: vstipDebug0004
For those not familiar with WPF Trees, check out this article: https://msdn.microsoft.com/en-us/library/ms753391(VS.100).aspx
Now. For those that ARE familiar with them have we got something for you: WPF Tree Visualizer. Yes, it started out as a CodePlex project and ended up in the product itself as a visualizer. But how do you use it?
Enter debug mode using any method you prefer.
Once you are there take a look at either a DataTip, the Watch window, the Autos window, or the Locals window. For this example, I will use the Autos window.
Choose any control in the Autos window and then click on the magnifying glass way over to the right of the control name.
You will see a drop down list. Choose the WPF Tree Visualizer to get this dialog:
This thing has a lot of different parts so let's take a look at each one. First, the Visual Tree shows you the hierarchy of the controls:
Clicking on any particular node of the tree will show you the Rendering view just below:
Also, the selected control will have its properties displayed in the large area to the right:
In, both, the Visual Tree and the Properties area you can search/filter the results by typing into the "Search" or "Filter" textboxes respectively:
WARNING: Watch out for the results as they may not be what you expect. See the extra items in the list that don't have the word "context" in them? How did they get there? Well, if I scroll to the right and look at other properties you can see how it happened:
Currently, there is no way that I am aware of to change this behavior.
Comments
Anonymous
January 28, 2010
This is a very informative article. Thanks for this post. I could really use this.Anonymous
January 29, 2010
I've tried to use the WPF Tree Visualizer on my .NET 3.5 WPF project and VS 2010 Beta 2. However, instead of showing my the window (as in step 4) it informed me that the Microsoft.VisualStudio.Debugger.WpfTreeVisualizer.dll assembly was built with a different version of the CLR and could not be opened. Is that a known issue, or simply a mis-configuration on my part?Anonymous
January 29, 2010
I haven't tried it with anything but NET4. Anyone else seeing this?Anonymous
January 29, 2010
Easy repro (for me) with VS 2010 B2:
- Create WPF project
- Change Target framework to ".NET Framework 3.5"
- Set breakpoint in the constructor of MainWindow
- Hit breakpoint, set 'Watch' to 'this' and launch the WPF Tree Visualizer Observe the error message that pops up. Am I the only one seeing this (I repro'ed it on 2 machines so far).
Anonymous
January 29, 2010
Cool I just got it, too. Must be a beta thing. Let me ping the team and see if this is a known issue...Anonymous
January 29, 2010
Thanks for following up with the product team. Please let us know what you find out (in case there is a work-around or fix for this).Anonymous
February 05, 2010
"" I've tried to use the WPF Tree Visualizer on my .NET 3.5 WPF project and VS 2010 Beta 2. However, instead of showing my the window (as in step 4) it informed me that the Microsoft.VisualStudio.Debugger.WpfTreeVisualizer.dll assembly was built with a different version of the CLR and could not be opened. Is that a known issue, or simply a mis-configuration on my part? "" I've been having the same issue too.Anonymous
February 06, 2010
Okay, so I've installed the Release Candidate and the issue seems to be fixed (at least I couldn't repro it). The RC should be public soon so let me know if the problem still exists for you folks.Anonymous
June 01, 2011
I'm using the visualizer in 2010 and opening a pretty heavy canvas with lots of content. Im not seeing a rendering pane show up, perhaps it turns it off due to the load? it also take a VERY long time to open.Anonymous
June 01, 2011
Hey setiri :) I haven't tested it under heavy load so it's very likely that having all the content is the issue. Even though it has been out for a bit prior to inclusion in VS2010, I still consider this the v1 of this feature. I expect we will see an all-around improvement over future releases. ZAnonymous
July 23, 2011
I've tried to report this issue elsewhere but haven't had a reply, so I'm curious about your thoughts. MCTS 70-511 practice question: You are using the WPF Tree Visualizer. You need to determine the origin of the Background property value of a ComboBox. Which part of the WPF Tree Visualizer gives this information?
- The Source column of the Properties display
- The Value column of the Properties display
- (other silly options omitted) The answer given is the Value column. I think that's wrong. Would you agree?
- Anonymous
January 27, 2012
The comment has been removed - Anonymous
April 08, 2013
There cannot be a correct answer unless they define what the 'origin' of the property is. And I agree, the 'Training Kit' is horrible. With so many errors, you never know if anything they say is correct.