1
Reply

Explain the difference between Logical Tree and Visual Tree in XAML?

Meesha Goyal

Meesha Goyal

12y
2.7k
0
Reply

    Visual tree is the representation of the object tree that is being filtered and modified. Visual tree also reports the objects that are part of the control in a composite form. Visual tree is used for rendering process that includes control template and analysis of control's structure. Silverlight comes with VisualTreeHelper API that represents the tree in a generalized way. It shows object parent and child relationship properties. The files that are used are as follows:System.Windows.Controls.ListBoxSystem.Windows.Controls.BorderSystem.Windows.Controls.ScrollViewerSystem.Windows.Controls.GridSystem.Windows.Shapes.RectangleLogical trees add content to the elements using different properties that is being provided with other controls and item properties. Logical tree shows the content model and iterate over the child elements and the content models can be made extensive for the use only. It provides a framework for notifications till all the contents models are not loaded. Ex: ListBox and the files that are used are:System.Windows.Controls.ListBoxSystem.Windows.Controls.ListBoxItemSystem.String