Using the WPF Tree Visualizer

Tips Search

Using the WPF Tree Visualizer

  • Comments 13

Versions:  2010
Published:  1/29/2010
Code:  vstipDebug0004

 

For those not familiar with WPF Trees, check out this article:  http://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? 

 

  1. Enter debug mode using any method you prefer.
  2. 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.
  3. Choose any control in the Autos window and then click on the magnifying glass way over to the right of the control name.
    image
  4. You will see a drop down list.  Choose the WPF Tree Visualizer to get this dialog:
     image
  5. 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:
    image
  6. Clicking on any particular node of the tree will show you the Rendering view just below:
    image
  7. Also, the selected control will have its properties displayed in the large area to the right:
    image

  8. In, both, the Visual Tree and the Properties area you can search/filter the results by typing into the "Search" or "Filter" textboxes respectively:
    image

  9. 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:
    image 

    Currently, there is no way that I am aware of to change this behavior.
  • This is a very informative article. Thanks for this post. I could really use this.

  • 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 haven't tried it with anything but NET4.  Anyone else seeing this?

  • Easy repro (for me) with VS 2010 B2:

    1. Create WPF project

    2. Change Target framework to ".NET Framework 3.5"

    3. Set breakpoint in the constructor of MainWindow

    4. 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).

  • Cool I just got it, too.  Must be a beta thing.  Let me ping the team and see if this is a known issue...

  • 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).

  • "" 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.

  • 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.

  • 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.

  • 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.

    Z

  • 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?

  • @Johnny: i have found at least 10 'false positives'in the sample exams which come with the 70-511 book, which is annoying. I also think the answer should be the Source column.

  • 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.

Page 1 of 1 (13 items)
Leave a Comment
  • Please add 5 and 4 and type the answer here:
  • Post