What is Visual Tree and Logical Tree in WPF?

By | August 3, 2011

Every programming style contains some sort of LogicalTree which comprises the Overall Program. The LogicalTree comprises the elements as they are listed in XAML. Thus they will only include the controls that you have declared in you XAML.

VisualTree on the other hand, comprises the parts that make up the individual controls. You do not generally need to deal with VisualTree directly, but you should know how each control is comprised of, so it would be easier to build custom templates using this.


I personally always like to see the VisualTree before using it. ExpressionBuilder is the one tool that allows you to generate the actual control.

This is a very basic concept of WPF, If you are looking for WPF Tutorials, here is the series of post by me http://www.abhisheksur.com/2010/12/wpf-tutorial.html