У меня есть что-то вроде этого:
<ListBox Height="456" Margin="30,113,0,0" x:Name="listBox1" Width="446" Background="Black">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28" Orientation="Horizontal">
<TextBlock Text="{Binding name}" FontSize="28" Padding="10" >
<toolkit:GestureService.GestureListener>
<toolkit:GestureListener
Hold="GestureListenerHold" />
</toolkit:GestureService.GestureListener>
</TextBlock>
<TextBlock Text="{Binding id}" FontSize="24" Padding="10" >
<toolkit:GestureService.GestureListener>
<toolkit:GestureListener
Hold="GestureListenerHold" />
</toolkit:GestureService.GestureListener>
</TextBlock>
<TextBlock Text="{Binding status}" FontSize="24" Padding="10">
<toolkit:GestureService.GestureListener>
<toolkit:GestureListener
Hold="GestureListenerHold" />
</toolkit:GestureService.GestureListener>
</TextBlock>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
и в моем приложении я делаю:
data = (List<Device>)serializer.Deserialize(stream);
this.listBox1.ItemsSource = data;
на каждом текстовом блоке У меня есть слушатель жестов, который должен предоставить пользователю возможностьизменить «имя», поэтому, когда они держат текстовый блок, приложение перемещает его на другую страницу, где он заполняет форму.
Мой вопрос: как найти техблок, который связывает «имя», когда я нажимаю и удерживаю другой техблок?