Understanding of the WPF logical tree concept

Source: Internet
Author: User

In WPF, the concept of a logical tree is critical. If a WPF developer does not know what a logical tree is or has a smattering of logical trees, then he is not a qualified WPF developer. Here's how the concept of the logical tree is more easily misinterpreted:

1. The logical tree does not exist only in objects built using XAML, but also in the logical tree of objects built using program code.

XAML is a new API dedicated to WPF programming, just like C # was used exclusively for. NET Development APIs. Therefore, as long as the "interface

object is created, we can draw a logical tree for it.

2, the logical tree is to describe the "interface object" construction process, rather than "interface object" structure.

The logical tree is composed of "interface objects" and the objects they contain, which are added to the object when the interface object is created

The "interface Object").

3. The logical tree is composed of "interface object" and "Content attribute", among them is "parent node" and "Child node" in tree structure. "Child Node" Also

You can continue to expand until "child nodes" no longer contain content attributes, so you can say that this "child node" is a "leaf point" in the logical tree.

4, no value of the "Content property" does not appear in the logical tree, only the property value of the "Content property" is a logical tree node.

Having mastered the above, we can easily draw the logical tree it represents when we get a XAML or a section of C # code. Wpf

Many of the concepts in it need to rely on the logical tree to help understand, so it is important to draw the logical tree correctly.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.