I am creating a Windows phone 8.1 application
I have a generated a list of textboxes RepTb in a listview. But I cannot figure out a way to get the text in these textboxes.
<Grid>
<Grid.Resources>
<DataTemplate x:Name="items">
<TextBox Name="RepTb" Header="{Binding}"
Width="100" HorizontalAlignment="Left"
LostFocus="RepTb_LostFocus"/>
</DataTemplate>
</Grid.Resources>
<ListView x:Uid="RepListView"
ItemsSource="{Binding}"
ItemTemplate="{StaticResource items}"
Name="RepList"/>
</Grid>
Code used to create textboxes:
List<string> setlist = new List<string>();
int set = 10;
for (int i = 1; i <= set; i++ )
setlist.Add("Reps in Set " + i);
RepList.DataContext = setlist;
Can anyone tell me how to iterate through RepList and get the content off the textboxes?