#113 – An Application for Viewing a WPF Visual Tree

Here’s a little WPF application that can load .xaml files and then display the underlying logical and visual trees. It uses the LogicalTreeHelper.GetChildren and VisualTreeHelper.GetChild methods to recursively descend through the logical and visual trees and display them in two TreeView controls.  (Currently only works if root element of the .xaml file is a <Window> element).

You can download an executable version of the application from: DisplayWpfTrees.zip

You can find a more detailed explanation of the application at: An Application to Let You View WPF Logical Trees

You can find full source code at the WPFLogicalTree project on Codeplex.