给定以下 XAML:
<ListView Name="UnitProperties" Grid.Column="2">
<ListView.View>
<GridView>
<GridViewColumn Header="Property">
<GridViewColumn.CellTemplate>
<DataTemplate>
<Label Content="{Binding Path=Name}"/>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="Value">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBox Text="{Binding Path=Value}" LostFocus="TextBox_LostFocus_1" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
当 TextBox 失去焦点时,我想获取第一列中标签的值。我如何通过代码做到这一点?文本框的 Parent 属性为空。