#108 – The Logical Tree(逻辑树)
来源:互联网 发布:linux shell 小数比较 编辑:程序博客网 时间:2024/06/11 23:58
原文地址:https://wpf.2000things.com/2010/10/28/108-the-logical-tree/
在WPF中,逻辑树表示组成UI的元素的层级关系。如果UI在XAML中定义,逻辑树可以看做是由一组XAML元素通过 父/子 关系组成的树。
逻辑树同样可以被认为是一种描述运行环境中哥哥元素间关系的模型。了解逻辑树可以帮助理解以下内容:
-资源查找
-属性继承
-事件路由
下面XAML是一个逻辑树的例子:
<Window x:Class="WpfApplication4.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="A window.." Height="350" Width="525"> <StackPanel> <Button Content="Click Me" Height="23" HorizontalAlignment="Left" Width="75" Click="button1_Click" /> <TextBox /> <ListBox> <ListBoxItem Content="Barley"/> <ListBoxItem Content="Oats"/> </ListBox> </StackPanel></Window>
树结构如下:
0 0
- #108 – The Logical Tree(逻辑树)
- #131 – Dependency Properties Inherit Values from Higher Up in the Logical Tree(逻辑树中元素的依赖属性可从其上层元素继承)
- #585 – 隧道事件沿逻辑树从上至下传递(Tunneling Events Propagate Down the Logical Tree)
- Fortran 逻辑变量(LOGICAL)
- Understanding the Visual Tree and Logical Tree in WPF
- #309 – 键盘焦点和逻辑焦点(Keyboard Focus vs. Logical Focus)
- LVM2 Logical Volume Manager 详解(八)--LVM逻辑卷Logical Volume命令实战
- 学习LVM(Logical Volume Manager--逻辑盘卷管理)
- Linux 系统 LVM(Logical Volume Manager)逻辑卷管理
- 磁盘管理之逻辑卷管理(Logical Volume Manager)
- 逻辑模型 - Logical Data Model
- The logical standby database
- Physical Reads(物理读)和Logical Reads(逻辑读)(转)
- Physical Reads(物理读) 和Logical Reads(逻辑读)
- Linux中LVM(逻辑盘卷管理)logical volume manager
- 磁盘管理之逻辑卷管理(Logical Volume Manager)
- 使用ovn-trace分析OVN 逻辑流表(Logical Flow)
- 创建逻辑备用库(Logical Standby Database)
- 使用NTP服务器同步Android设备时间
- 既然绝大多数科研人员都可以查阅顶级期刊,为什么不同学校之间的科研实力依然差距巨大?
- iOS巅峰之调用系统相机和打开闪光灯
- Apollo 入门指导
- javaweb上传文件时在tomcat配置虚拟路径
- #108 – The Logical Tree(逻辑树)
- 图片地址存储
- Bulls and Cows - JS
- 【复习】servlet之cookie
- Qt 常用类(3)—— QString
- leetCode_找出不重复子集
- VBS脚本和HTML DOM自动操作网页
- memcached magent
- 科研画图都用什么软件?