【发布时间】:2014-10-20 15:50:50
【问题描述】:
我使用的是 Windows 8.1。我有一个使用 ItemsSource 属性填充的 ListView。 在我的 ListView.ItemTempalte 中,它有一个 TextBox。
<ListView
ItemsSource="{Binding CollectionGroups, Source={StaticResource GroupedData}}">
<ListView.ItemTemplate>
<DataTemplate>
<TextBox Text="{Binding Group.Property1}"
Foreground="Black" FontSize="18" />
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
我的问题是如何在我的 C# 代码中获取最后一项文本框?我在上面显示的 xaml 页面背后的代码?例如,我的 CollectionGroups 中有 10 个项目,我的列表视图应该有 10 个文本框。如何获取列表视图的第 10 个文本框?
谢谢。
【问题讨论】:
标签: windows-phone