我是一名WPF新手,所以我认为这是一个简单的问题。问题是我无法获取文本框名称。该文本框位于GridView内。有没有解决方法? 该文本框位于DataTemplate下。
XAML
<GridViewColumn.CellTemplate >
<DataTemplate >
<StackPanel >
<TextBox x:Name="txtPurchasePrice"
Width="60"
TextChanged="txtPurchasePrice_TextChanged" />
</StackPanel>
</DataTemplate>
</GridViewColumn.CellTemplate>