How to Delete Item from Observable collection in C#
问题 I am working on windows phone app and I want to delete item from listbox. I am using following code List numbers=new List(); ObservableCollection<string> myCollection = new ObservableCollection<string>(numbers); int indexPerson = listBox1.SelectedIndex; myCollection.RemoveAt(indexPerson); var my = (ObservableCollection<string>)listBox1.ItemsSource; listBox1.ItemsSource=my; and when I click on delete button one item is deleted based on index and then when I will delete another item the