当你写
<Label Name="myLabel" Content="{Binding Path=Name}" />
意味着你的绑定是myLabel.DataContext.Name, 而不是myLabel.Name.
The XAML in WPF is just a pretty user interface to display and interact with the actual data, otherwise known as the DataContext.
而诸如另外的绑定方式如:
<TextBox Name="TextBox1" Height="30" Text="{Binding ElementName=ColorPicker1, Path=SelectedColorText}"
Background="{Binding ElementName=ColorPicker1, Path=SelectedColor, Converter={StaticResource colorToSolidBrush}}"/>
The purpose of other binding sources (RelativeSource, ElementName, etc) is to point to another property that doesn't exist in the current control's DataContext