在WPF中控件玉控件之间的关系不是相邻就是叠加。
WPF的控件有了Content的概念,所以控件与控件之间又多出一种关系----包含。因为以窗体为根的包含关系,整个WPF的UI才形成树形结构,我们称之为可视化树(Visual Tree)。
可视化树代码:
<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="htt