我的页面中有这个列表框:
<ListBox x:Name="lstData" Tap="lstData_Tap" ItemsSource="{Binding
Source={StaticResource favoriteAddressCollection},
Path=DataCollection}" Margin="22">
<ListBox.ItemTemplate >
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Image Source="/Images/Search/favorite_red.png" Margin="12" />
<TextBlock Text="{Binding Path=Address}" VerticalAlignment="Center" Width="300" />
<Button BorderThickness="0" Width="60" Height="60" HorizontalAlignment="Right"
Tap="imgDelete_Tap">
<Button.Background>
<ImageBrush ImageSource="/Images/Search/unfavorite.png"></ImageBrush>
</Button.Background>
</Button>
<!--<Image x:Name="imgDelete" Source="/Images/Search/unfavorite.png" Width="40" Margin="12" HorizontalAlignment="Right"
Tap="imgDelete_Tap" />-->
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
现在我想在单击该图像后删除项目。我没有设置 SelectedItem 或 SelectedIndex 那么我怎么能以其他方式删除项目?我怎样才能知道我在哪一行点击了图片?